In version 1.66+ this packet have a new format.
- Code: Select all
Packet header...
...
End of packet header.
Packet body (all words is in network bytes order):
offset 0: word - crypt version (1 - new);
offset 2: word - unknown (not important);
offset 4: word - size of crypt block;
Begin of crypt block:
offset 6: word - size of crypt key;
offset 8: X bytes - RSA public key in special exported format from
[url]http://math.libtomcrypt.org[/url]
Functions for key creation:
rsa_make_key( &prng, find_prng( "sprng"), 2048 / 8, 65537, &key);
rsa_export( outbuf, &outlen, PK_PUBLIC, &key);
NOTE: Please use only TomCrypt version 9.1, exported key have version of this lib inside.