# RE: More security

Frank Yellin (Frank.Yellin@eng.sun.com)
Mon, 8 Mar 1999 17:52:27 -0800

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Ilan Zohar: "Security flaws in SealedObjects"
- Previous message: Jan Luehe: "Re: CFB mode problems"

    From: "Frank Yellin" <Frank.Yellin@eng.sun.com>

    To: "Jan Luehe" <Jan.Luehe@eng.sun.com>, <java-security@java.sun.com>,

    Subject: RE: More security

    Date: Mon, 8 Mar 1999 17:52:27 -0800

    In-Reply-To: <libSDtMail.9903081723.22402.luehe@laguna>

Many thanks.

Please realize I'm not trying to be ornery or pedantic or anything. I was a
real user
who hadn't worked on the JCE who was trying to figure out how to do
something, and just plain wasn't able to. . . .

The root of all this is that I'm taking a cryptography course at Stanford,
and the goal was to write a client/server application that used encryption
and MAC's. I was in something of a dilemma:

Do I pretend like I'm J Random User who only has access to the published
documentation?
or
Do I make use of the fact that I have access to the sources of our crypto
and
security stuff?

I tried >>really hard<< not to look at the sources. I pretty much used the
sources
only to try and figure out if I was going about something the wrong way.

Clearly, one of my first problems is that I couldn't figure out how to
create a MAC, and I
certainly couldn't figure out how to create a shared MAC. I had to read the
source code to
figure out that a MAC wanted up to 64 bytes of key.

It honestly never occurred to me to just pass it the cipher key.

My first implementation was (not using real JCE code, but you get the idea.
. .)
macKey = sharedKey.encrypt("The quick brown fox jumps over the lazy
dog.");
The obvious problem is that if sharedKey is DES, for example, then I've only
got 56 bits
"randomness." If my MAC allows 64*8 bits of randomness, do I really want to
subject my MAC
to the limitations of DES being 56 bits?

This probably isn't universally agreed to, but in my mind:

secret key cryptography is to public key cryptography
as MAC is to signature

The left involves a private secret between two people. The right involves
private info versus
published info. The goal of a MAC is to prove that a document can only have
been created by
someone with the secret key, as as the role of a signature is to prove it
can only have been
created by someone with the private key.

KeyPair.getInstance() knows about both cryptography and signatures.
Why not SecretKey.getInstance()?

But the most important thing is that other users won't be confused, and
won't have to send
mail to java-security!

And the html is exactly what I wanted!

Thanks again. I'm done.

== Frank

- Next message: Ilan Zohar: "Security flaws in SealedObjects"
- Previous message: Jan Luehe: "Re: CFB mode problems"