[ENH] AES

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[ENH] AES

cerebus-4
from preamble:

"Change Set: AES
Date: 24 November 2006
Author: Timothy J. Miller

It struck me as convenient to have an AES class.  All I did was subclass
Rijndael and override new with the relevant block size and key size.  I
have no idea if this is sufficient, but I suppose it's a start.  Now I
need to figure out how to write tests."!

_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography

AES.cs.gz (662 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ENH] AES

cerebus-4
On 11/24/06, [hidden email] <[hidden email]> wrote:

> It struck me as convenient to have an AES class.  All I did was subclass
> Rijndael and override new with the relevant block size and key size.  I
> have no idea if this is sufficient, but I suppose it's a start.  Now I
> need to figure out how to write tests.

Just to let everyone know, I *really* don't have any idea what I'm doing. :)

Background:  I don't write code in my day job, and it's been many
years since I've seriously coded at all beyond scripting for my own
convenience.  Currently I'm working for an FFRDC supporting a
government PKI, so I've been steeped more in the policy end and riding
herd on vendors (like Cisco, though I don't think I've ever met
Krishna before) for the last 10 years, with a dash of sysadmin and
testing thrown into the mix.

My knowledge of crypto doesn't extend far beyond using the primitives
to construct protocols & systems.  I don't get the math, I may never
get the math, but in the end it may not matter.

My interest in Squeak runs back a bunch of years, but I never did more
than toy with it.  What's changed recently was I got a chance to sit
in on a demonstration by a couple of guys from MIT Lincoln Labs who
are doing interesting things with Boneh/Waters/Gentry broadcast
encryption on a contract.  Their system requires ECC and I thought it
would be interesting to model their prototype, which led me back to
Squeak, which led me to this project.

-- Tim
_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

RE: [ENH] AES

Ron Teitelbaum
In reply to this post by cerebus-4
Ok I agree.  I've already had someone suggest writing AES when we already
had it.  And who can pronounce Rijndael?  I'd really like to know how he
says it!

Thanks I'll put it in next week.

Ron

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> [hidden email]
> Sent: None
> To: [hidden email]
> Subject: [Cryptography Team] [ENH] AES
>
> from preamble:
>
> "Change Set: AES
> Date: 24 November 2006
> Author: Timothy J. Miller
>
> It struck me as convenient to have an AES class.  All I did was subclass
> Rijndael and override new with the relevant block size and key size.  I
> have no idea if this is sufficient, but I suppose it's a start.  Now I
> need to figure out how to write tests."!

_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

Re: RE: [ENH] AES

cerebus-4
IIRC it's like "rhine-dahl."

Here's a sound file:

http://rijndael.info/audio/rijndael_pronunciation.wav

-- Tim
_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

RE: [ENH] AES

Ron Teitelbaum
In reply to this post by cerebus-4
Welcome Tim!  It's nice to have you here.  I'm sure your experience will be
very useful.  Maybe you can help us write a grant to fund our lab expenses!

Ron

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Cerebus
> Sent: Friday, November 24, 2006 6:07 PM
> To: [hidden email]
> Subject: Re: [Cryptography Team] [ENH] AES
>
> On 11/24/06, [hidden email] <[hidden email]> wrote:
>
> > It struck me as convenient to have an AES class.  All I did was subclass
> > Rijndael and override new with the relevant block size and key size.  I
> > have no idea if this is sufficient, but I suppose it's a start.  Now I
> > need to figure out how to write tests.
>
> Just to let everyone know, I *really* don't have any idea what I'm doing.
> :)
>
> Background:  I don't write code in my day job, and it's been many
> years since I've seriously coded at all beyond scripting for my own
> convenience.  Currently I'm working for an FFRDC supporting a
> government PKI, so I've been steeped more in the policy end and riding
> herd on vendors (like Cisco, though I don't think I've ever met
> Krishna before) for the last 10 years, with a dash of sysadmin and
> testing thrown into the mix.
>
> My knowledge of crypto doesn't extend far beyond using the primitives
> to construct protocols & systems.  I don't get the math, I may never
> get the math, but in the end it may not matter.
>
> My interest in Squeak runs back a bunch of years, but I never did more
> than toy with it.  What's changed recently was I got a chance to sit
> in on a demonstration by a couple of guys from MIT Lincoln Labs who
> are doing interesting things with Boneh/Waters/Gentry broadcast
> encryption on a contract.  Their system requires ECC and I thought it
> would be interesting to model their prototype, which led me back to
> Squeak, which led me to this project.
>
> -- Tim
> _______________________________________________
> Cryptography mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography


_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

RE: RE: [ENH] AES

Ron Teitelbaum
In reply to this post by cerebus-4
Very cool thanks!!

Ron

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Cerebus
> Sent: Friday, November 24, 2006 6:12 PM
> To: [hidden email]; Cryptography Team Development List
> Subject: Re: RE: [Cryptography Team] [ENH] AES
>
> IIRC it's like "rhine-dahl."
>
> Here's a sound file:
>
> http://rijndael.info/audio/rijndael_pronunciation.wav
>
> -- Tim
> _______________________________________________
> Cryptography mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography


_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

Re: [ENH] AES

cerebus-4
In reply to this post by cerebus-4
On 11/24/06, [hidden email] <[hidden email]> wrote:

> Added AES192 and overloaded the blockSize: and keySize: methods with
> do-nothings (is there a better way to do this?) since they make no sense
> for AES.  Part of me is thinking that these should be a single class
> with keySize selection at instance creation.   Comments welcome."!

I'm also working on a couple of tests, but I'll note that I threw a
couple of FIPS 197 and RFC3602 test vectors at these classes and they
came out fine.

The more I think about it the more I think I'll refactor as a single class.

-- Tim
_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

Re: [ENH] AES

Joshua Gargus-2
It seems like a good idea to refactor as a single class.  However,  
even with a single class that can handle multiple key sizes, it seems  
redundant to have a #keySize: method, when the size of the key can be  
easily determined in #key: .  It would make sense to make this change  
in Rijndael, and have AES inherit it.

With respect to #blockSize:, it might be better to throw an exception  
(eg: 'AES does not support multiple block sizes; use Rijndael  
instead') so that the user is educated, rather than assuming that the  
method does something when it really doesn't.

Cheers,
Josh


On Nov 24, 2006, at 9:17 PM, Cerebus wrote:

> On 11/24/06, [hidden email] <[hidden email]> wrote:
>
>> Added AES192 and overloaded the blockSize: and keySize: methods with
>> do-nothings (is there a better way to do this?) since they make no  
>> sense
>> for AES.  Part of me is thinking that these should be a single class
>> with keySize selection at instance creation.   Comments welcome."!
>
> I'm also working on a couple of tests, but I'll note that I threw a
> couple of FIPS 197 and RFC3602 test vectors at these classes and they
> came out fine.
>
> The more I think about it the more I think I'll refactor as a  
> single class.
>
> -- Tim
> _______________________________________________
> Cryptography mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/ 
> cryptography

_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

Re: Re: [ENH] AES

cerebus-4
On 11/24/06, Joshua Gargus <[hidden email]> wrote:
> It seems like a good idea to refactor as a single class.  However,
> even with a single class that can handle multiple key sizes, it seems
> redundant to have a #keySize: method, when the size of the key can be
> easily determined in #key: .  It would make sense to make this change
> in Rijndael, and have AES inherit it.

I *just* posted a refactoring.

> With respect to #blockSize:, it might be better to throw an exception
> (eg: 'AES does not support multiple block sizes; use Rijndael
> instead') so that the user is educated, rather than assuming that the
> method does something when it really doesn't.

Good point.  I guess I'll have to go learn exceptions now.  Tomorrow.
Err, today.  In the morning--wait.  After some sleep.  :)

-- Tim
_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

Re: [ENH] AES

Joshua Gargus-2

On Nov 24, 2006, at 10:25 PM, Cerebus wrote:

> On 11/24/06, Joshua Gargus <[hidden email]> wrote:
>> It seems like a good idea to refactor as a single class.  However,
>> even with a single class that can handle multiple key sizes, it seems
>> redundant to have a #keySize: method, when the size of the key can be
>> easily determined in #key: .  It would make sense to make this change
>> in Rijndael, and have AES inherit it.
>
> I *just* posted a refactoring.
>
>> With respect to #blockSize:, it might be better to throw an exception
>> (eg: 'AES does not support multiple block sizes; use Rijndael
>> instead') so that the user is educated, rather than assuming that the
>> method does something when it really doesn't.
>
> Good point.  I guess I'll have to go learn exceptions now.

Easy.  Just make a new subclass of Error, perhaps ImproperCipherUse,  
and then override #blockSize: to signal it:

blockSize: aNumber
        ImproperCipherUse signal: 'AES does not support multiple block  
sizes; use Rijndael instead'

Josh


> Tomorrow.
> Err, today.  In the morning--wait.  After some sleep.  :)

:-)

Josh

>
> -- Tim
> _______________________________________________
> Cryptography mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/ 
> cryptography

_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
msh
Reply | Threaded
Open this post in threaded view
|

Re: [ENH] AES

msh
In reply to this post by cerebus-4
Funny how we get different things out of things we hear... I heard  
"rain-doll"

On Nov 24, 2006, at 3:12 PM, Cerebus wrote:

> IIRC it's like "rhine-dahl."
>
> Here's a sound file:
>
> http://rijndael.info/audio/rijndael_pronunciation.wav
>
> -- Tim
> _______________________________________________
> Cryptography mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/ 
> cryptography

_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

Re: Re: [ENH] AES

cerebus-4
On 11/25/06, Matthew S. Hamrick <[hidden email]> wrote:
> Funny how we get different things out of things we hear... I heard
> "rain-doll"

All dose dang furriners tawk funny ennyways.

(Damn it's hard to talk with your tongue in your cheek. :)

-- Tim
_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

Re: Re: [ENH] AES

Frank Shearar
"Cerebus" <[hidden email]> wrote:

> On 11/25/06, Matthew S. Hamrick <[hidden email]> wrote:
> > Funny how we get different things out of things we hear... I heard
> > "rain-doll"
>
> All dose dang furriners tawk funny ennyways.
>
> (Damn it's hard to talk with your tongue in your cheek. :)

I did like the FAQ entries on
http://www.iaik.tu-graz.ac.at/research/krypto/AES/old/~rijmen/rijndael/. I'd
fall under the "it's pronounced like you think it should be" category, being
South African :)

frank

_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography