News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Encryption procedure

Started by Farabi, August 16, 2010, 02:37:53 PM

Previous topic - Next topic

Sevag.K

if anyone is interested, i've been working on AES ciphers and they are considered practically uncrackable and have a byte to byte translation.

just released the preliminary code on the HLA forum, i can convert that to MASM syntax.  code only for encryption at this point, but decryption is easy enough to implement, i just haven't had the time yet.


Magnum

Thanks.

I am interested in your encryption code.

Have a great day,
                         Andy

Sevag.K

#62
okay, but be warned that the masm syntax is compiled from hla syntax so it will be a bit hard to read.

an overview:

the Aes procedure is called to initialize the expansion table.  it takes three arguments, a constant for bit size (0, 1, or 2), a pointer to the key data and the size of the key.

the Cipher procedure takes two arguments, a pointer to a 16byte source to encrypt and a pointer to a buffer to store the encryption.

[edit:updated below]

hutch--

I agree with Cork here, find a secure way to send a high quality random pad of a large size to the recipient then send them messages that only have to specify the start offset of the pad. A 1 megabyte pad can be used 1000 times with unique pad sections, a larger pad can be used many more time while providing a unique pad for each message.

My own preference is a SHR XOR - XOR SHL for up and down but the technique will break the heart of supercomputers as its stats are impressive, 256^characters in the message with no method of determining which one is correct.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Sevag.K


last one didn't print out all right.  anyway, i've made a more concrete version into a library with encryption and decryption.  attached is the library with sources, including a masm source compilation.  i've included the hla sources since those are commented and formatted.


hutch--

Sevag,

Do us a favour and put long source code blocks into a zip file as they are hard to read pasted into a forum edit window.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php