Print( 'Local Public N=', repr( public_n)) Print( 'Assert that the received public N match the one generated locally') Raise Exception( 'failed to set the RSA key') Print( 'Trying to read the public RSA N part 2.') OKGETPUBKEY, payload = bytes()) #, payload=) Print( 'Trying to read the public RSA N part 1.') # For this example it will be a decryption key # ok.set_rsa_key(1, (1+64), byte array here) #Can only send 56 bytes per packet OKSETPRIV, slot_id = 1, key_type =( 1 + 32), payload = q_and_p) # send the byte array to OnlyKey splitting into 56 bytes per packet # half byte of the byte array and q in the second half byte # I need to convert these into a single byte array put p in the first # p and q are long ints that are no more than 1/2 the size of pubkey It seems to be want you wanted? it's 64 bytes. Print( 'You should see your OnlyKey blink 3 times') generate( 1024, random_generator) #generate pub and priv keyīinPubKey = key.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |