4/24/2023 0 Comments Aborange crypter portable![]() The FPE field has many articles with proven techniques and proposed standards, including BPS and SP800-38G Draft. ![]() What you are asking is a straight application of Format Preserving Encryption, which builds ciphers which input and output are in a constrained format (generically: common to input and output, hence preserved). ![]() This example is obviously vulnerable to a brute force attack, but for cases where the integers are of or exceed 128 bits of length, I want the strength of the AES algorithm. Is there a better way to encrypt integers of an arbitrary range? Ideally I want it to be as strong as the AES algorithm. Return 0x9783 // this isn't the right value! The issue is that the decryption process sometimes halts too early.ĭata = aes_ofb_encrypt(data) // keystream "0x8d7c", data = 0xff48ĭata = aes_ofb_encrypt(data) // keystream "0xe5b7", data = 0x1affĭata = aes_ofb_decrypt(data) // keystream "0x8d7c", data = 0x9783Ġx9783 is in the range // halting too early!! I'm using a stream cipher so that the ciphertext can be truncated without ruining the whole thing. My latest attempt at this repeatedly encrypts an integer with AES_OFB until it is in the requested range. I need an algorithm that can take an integer, an arbitrary range, a key of 16/24/32 bytes, and an initialization vector of 16 bytes(ideally), and return an integer in the same range.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |