[PATCH] CFB 8 Bit implementation

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] CFB 8 Bit implementation

Mathias L. Baumann
Hello dear Gcrypt Devs,

as a followup to Lizas request/inqueries I now implemented CFB in 8 bit
mode.

Please let me know about any changes you want to see.

I should add that my stack burning code is more or less just guessing
how it should be done by imitating what I saw in the other functions.
Please validate that I did that correct :)


The patch is attached and can also found at
https://github.com/mathias-baumann-sociomantic/libgcrypt/tree/cfb8

cheers,

     --Mathias Baumann

_______________________________________________
Gcrypt-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel

0001-Implement-CFB-with-8bit-mode.patch (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] CFB 8 Bit implementation

Stephan Müller
Am Dienstag, 24. Januar 2017, 15:43:31 CET schrieb Mathias L. Baumann:

Hi Mathias,

> Hello dear Gcrypt Devs,
>
> as a followup to Lizas request/inqueries I now implemented CFB in 8 bit
> mode.
>
> Please let me know about any changes you want to see.
>
> I should add that my stack burning code is more or less just guessing
> how it should be done by imitating what I saw in the other functions.
> Please validate that I did that correct :)

I guess you should take at least one or two test vectors from http://
csrc.nist.gov/groups/STM/cavp/block-ciphers.html#aes and add as a self test as
you find in all other implementations.

If you want to confirm your implementation, have all test vectors you find at
the given URL processed by your implementation.
>
>
> The patch is attached and can also found at
> https://github.com/mathias-baumann-sociomantic/libgcrypt/tree/cfb8
>
> cheers,
>
>      --Mathias Baumann



Ciao
Stephan

_______________________________________________
Gcrypt-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] CFB 8 Bit implementation

Mathias L. Baumann

> I guess you should take at least one or two test vectors from http://
> csrc.nist.gov/groups/STM/cavp/block-ciphers.html#aes and add as a self test as 
> you find in all other implementations.

> If you want to confirm your implementation, have all test vectors you find at 
> the given URL processed by your implementation. 


I have used the vectors found at http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf

which is also what the other tests in that file use. Unfortunately that document didn't seem to provide vectors >1 byte.

Neither does your link though.


I did test the implementation with numerous internal tests in our applications that previously worked with the mcrypt library.


With those tests and my own I am fairly confident about the implementation.


However if you wish to see all those tests implemented before accepting the patch, I can do that.


cheers,


--Marenz


From: Stephan Müller <[hidden email]>
Sent: 25 January 2017 14:27:58
To: [hidden email]
Cc: Mathias Baumann
Subject: Re: [PATCH] CFB 8 Bit implementation
 
Am Dienstag, 24. Januar 2017, 15:43:31 CET schrieb Mathias L. Baumann:

Hi Mathias,

> Hello dear Gcrypt Devs,
>
> as a followup to Lizas request/inqueries I now implemented CFB in 8 bit
> mode.
>
> Please let me know about any changes you want to see.
>
> I should add that my stack burning code is more or less just guessing
> how it should be done by imitating what I saw in the other functions.
> Please validate that I did that correct :)

I guess you should take at least one or two test vectors from http://
csrc.nist.gov/groups/STM/cavp/block-ciphers.html#aes and add as a self test as
you find in all other implementations.

If you want to confirm your implementation, have all test vectors you find at
the given URL processed by your implementation.
>
>
> The patch is attached and can also found at
> https://github.com/mathias-baumann-sociomantic/libgcrypt/tree/cfb8
>
> cheers,
>
>      --Mathias Baumann



Ciao
Stephan

_______________________________________________
Gcrypt-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] CFB 8 Bit implementation

Jussi Kivilinna-2
In reply to this post by Mathias L. Baumann
Hello,

On 24.01.2017 16:43, Mathias L. Baumann wrote:
> Hello dear Gcrypt Devs,
>
> as a followup to Lizas request/inqueries I now implemented CFB in 8 bit mode.
>
> Please let me know about any changes you want to see.
>

Looks mostly ok, just few requests:
 - Change '//' C++ style comments to /* .. */
 - Add few multibyte test-vectors from [1] and [2].
 - Add changelog to commit message, see other commit for example (see [3]).
 - Send signed DCO to mailing list, and add 'Signed-off-by' to commit message (see [3]).

> I should add that my stack burning code is more or less just guessing how it should be done by imitating what I saw in the other functions.
> Please validate that I did that correct :)
>

Yes, it's done correctly.

-Jussi

[1] http://csrc.nist.gov/groups/STM/cavp/documents/des/tdesmmt.zip
[2] http://csrc.nist.gov/groups/STM/cavp/documents/aes/aesmmt.zip
[3] https://github.com/mathias-baumann-sociomantic/libgcrypt/blob/master/doc/HACKING



_______________________________________________
Gcrypt-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel

signature.asc (281 bytes) Download Attachment
Loading...