Rijndael 256

447 views
Skip to first unread message

Ivan Daunis

unread,
Dec 1, 2013, 1:20:36 PM12/1/13
to golan...@googlegroups.com
Hello,

Does any one knows a way to encrypt/decrypt using Rijndael with a block size of 256 bits in Go? I don't see a way to change the block size of the go AES package from the 16 bytes.

Best,
Ivan  

Damian Gryski

unread,
Dec 1, 2013, 2:23:48 PM12/1/13
to golan...@googlegroups.com


On Sunday, December 1, 2013 7:20:36 PM UTC+1, Ivan Daunis wrote:

Does any one knows a way to encrypt/decrypt using Rijndael with a block size of 256 bits in Go? I don't see a way to change the block size of the go AES package from the 16 bytes.


   While the original Rijndael specification supports block and key sizes of 128, 192, and 256 bits, but in AES the block size is always 128 bits.  You will need to find another implementation of Rijndael that supports these different sized blocks.

   Damian

Frithjof Schulze

unread,
Dec 1, 2013, 3:58:44 PM12/1/13
to golan...@googlegroups.com
There is a implementation of Rijandael with 256 bit blocksize here https://github.com/agl/pond/tree/master/panda/rijndael,
but IIUC this wasn't written with performance in mind (or even side-channels).

-Frithjof

On Sunday, December 1, 2013 7:20:36 PM UTC+1, Ivan Daunis wrote:

Ivan Daunis

unread,
Dec 1, 2013, 5:39:00 PM12/1/13
to Frithjof Schulze, golan...@googlegroups.com
This might help, but I need to support CBC chaining...

Best,
Ivan
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Frithjof Schulze

unread,
Dec 2, 2013, 7:58:01 AM12/2/13
to golan...@googlegroups.com, Frithjof Schulze


On Sunday, December 1, 2013 11:39:00 PM UTC+1, Ivan Daunis wrote:
This might help, but I need to support CBC chaining...

Then either wrap the rijndael.Cipher struct with an implementation of the crypto/cipher.Block interface (basically using []byte slices instead of [32]byte arrays),
or copy http://golang.org/src/pkg/crypto/cipher/cbc.go and change it to use rijndael.Cipher instead of cipher.Block.

-Frithjof
Reply all
Reply to author
Forward
0 new messages