aboutsummaryrefslogblamecommitdiff
path: root/vector/README.md
blob: 977f2078d2117df329260fa0299ca4c30415b544 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                            







                                                                                                                                                                                                                                                                                                                                                                                                                                     

   

modexpng_fpga_model / vector

Ranzomized test vector generation scripts for ModExpNG core model.

  • vector_regenerate.py generates a new random RSA keypair using OpenSSL. Each invocation overwrites the keypair, the old one is not retained. Never use the generated keypair for anything outside of this model!
  • vector_format.py processes the previously generated keypair. It first generates a "random" demo message to be signed and a "random" blinding factor, signs the message and checks the signature using Python's built-in math. If everything goes well, it writes the formatted test vector to a file.
  • vector_util.py is a helper module.

To obtain a test vector, optionally edit KEY_LENGTH in vector_regenerate.py to set desired key length, then run the script to generate randomized key file. Then optionally edit KEY_LENGTH in vector_format.py to match key length and change RND_SEED_MESSAGE to get a different demo message and RND_SEED_BLINDING to get a different blinding factor. Finally run the script to obtain randomized test vector module.