Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
JSS doesn't support AES key unwrapping
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
alex.agra...@gmail.com  
View profile  
 More options Dec 23 2008, 5:59 am
Newsgroups: mozilla.dev.tech.crypto
From: alex.agra...@gmail.com
Date: Tue, 23 Dec 2008 02:59:38 -0800 (PST)
Local: Tues, Dec 23 2008 5:59 am
Subject: JSS doesn't support AES key unwrapping
When I try to unwrap AES key via JSS API, I get the following
exception:

cipher = Cipher.getInstance("RSA", jssProvider);
cipher.init(Cipher.UNWRAP_MODE, wrapKeyPair.getPrivate());
Key unwrappedKey = cipher.unwrap(wrappedData, "AES",
Cipher.SECRET_KEY);

org.mozilla.jss.util.AssertionException: assertion failure!
        at org.mozilla.jss.util.Assert._assert(Assert.java:58)
        at org.mozilla.jss.pkcs11.PK11KeyWrapper.algFromType
(PK11KeyWrapper.java:545)
        at org.mozilla.jss.pkcs11.PK11KeyWrapper.unwrapSymmetric
(PK11KeyWrapper.java:518)
        at org.mozilla.jss.pkcs11.PK11KeyWrapper.unwrapSymmetric
(PK11KeyWrapper.java:484)
        at
org.mozilla.jss.provider.javax.crypto.JSSCipherSpi.engineUnwrapSecret
(JSSCipherSpi.java:484)
        at org.mozilla.jss.provider.javax.crypto.JSSCipherSpi.engineUnwrap
(JSSCipherSpi.java:452)
        at javax.crypto.Cipher.unwrap(DashoA13*..)
        at EncryptionTest.main(EncryptionTest.java:86)

The exception comes from the following code (in PK11KeyWrapper) that
clearly misses AES case:

private static Algorithm
    algFromType(SymmetricKey.Type type) {
        if( type == SymmetricKey.DES ) {
            return EncryptionAlgorithm.DES_ECB;
        } else if( type == SymmetricKey.DES3 ) {
            return EncryptionAlgorithm.DES3_ECB;
        } else if( type == SymmetricKey.RC4 ) {
            return EncryptionAlgorithm.RC4;
        } else {
            Assert._assert( type == SymmetricKey.RC2 );
            return EncryptionAlgorithm.RC2_CBC;
        }
    }

I've seen other people complaining about a similar problem.
Is this done on purpose (lack of proper code in NSS/JSS)? Or is it
some minor bug in JSS that may be easily fixed?

Thank you in advance,
       Alex


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nelson B Bolyard  
View profile  
 More options Dec 23 2008, 2:53 pm
Newsgroups: mozilla.dev.tech.crypto
From: Nelson B Bolyard <nel...@bolyard.me>
Date: Tue, 23 Dec 2008 11:53:23 -0800
Local: Tues, Dec 23 2008 2:53 pm
Subject: Re: JSS doesn't support AES key unwrapping
alex.agra...@gmail.com wrote, On 2008-12-23 02:59:

Please file a bug in bugzilla.mozilla.org, product JSS, and put all
the above information into that bug.  If you prefer not to do that,
please let me know and I will file the bug.

> I've seen other people complaining about a similar problem.

oh?  This is the first report of this problem that I recall seeing.

> Is this done on purpose (lack of proper code in NSS/JSS)? Or is it
> some minor bug in JSS that may be easily fixed?

It's just a bug.  If my recollection is correct, and no one else has
reported this assertion failure before this, then it tells us that
this feature is largely unused. :(

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nelson B Bolyard  
View profile  
 More options Dec 23 2008, 8:52 pm
Newsgroups: mozilla.dev.tech.crypto
From: Nelson B Bolyard <nel...@bolyard.me>
Date: Tue, 23 Dec 2008 17:52:25 -0800
Local: Tues, Dec 23 2008 8:52 pm
Subject: Re: JSS doesn't support AES key unwrapping
I wrote, On 2008-12-23 11:53:

> Please file a bug in bugzilla.mozilla.org, product JSS, and put all
> the above information into that bug.  

Glen filed a bug based on this report. (Thanks, Glen)
See https://bugzilla.mozilla.org/show_bug.cgi?id=470982

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
alex.agra...@gmail.com  
View profile  
 More options Dec 24 2008, 2:32 pm
Newsgroups: mozilla.dev.tech.crypto
From: alex.agra...@gmail.com
Date: Wed, 24 Dec 2008 11:32:24 -0800 (PST)
Local: Wed, Dec 24 2008 2:32 pm
Subject: Re: JSS doesn't support AES key unwrapping

> oh?  This is the first report of this problem that I recall seeing.

Here is a similar report that I was referring to:
http://groups.google.com/group/mozilla.dev.tech.crypto/browse_thread/...

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nelson B Bolyard  
View profile  
 More options Dec 24 2008, 6:16 pm
Newsgroups: mozilla.dev.tech.crypto
From: Nelson B Bolyard <nel...@bolyard.me>
Date: Wed, 24 Dec 2008 15:16:30 -0800
Local: Wed, Dec 24 2008 6:16 pm
Subject: Re: JSS doesn't support AES key unwrapping
alex.agra...@gmail.com wrote, On 2008-12-24 11:32:

>> oh?  This is the first report of this problem that I recall seeing.

> Here is a similar report that I was referring to:
> http://groups.google.com/group/mozilla.dev.tech.crypto/browse_thread/...

Hmm.  That message never received any replies.  Maybe our JSS guru was
on vacation that week. (?)  Thanks for pointing that out.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
alex.agra...@gmail.com  
View profile  
 More options Jan 13 2009, 4:46 am
Newsgroups: mozilla.dev.tech.crypto
From: alex.agra...@gmail.com
Date: Tue, 13 Jan 2009 01:46:45 -0800 (PST)
Local: Tues, Jan 13 2009 4:46 am
Subject: Re: JSS doesn't support AES key unwrapping
FYI - I submitted a patch that fixes the problem.
See https://bugzilla.mozilla.org/show_bug.cgi?id=470982 for details.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Glen Beasley  
View profile  
 More options Jan 13 2009, 1:21 pm
Newsgroups: mozilla.dev.tech.crypto
From: Glen Beasley <Glen.Beas...@Sun.COM>
Date: Tue, 13 Jan 2009 10:21:50 -0800
Local: Tues, Jan 13 2009 1:21 pm
Subject: Re: JSS doesn't support AES key unwrapping
alex.agra...@gmail.com wrote:
> FYI - I submitted a patch that fixes the problem.
> See https://bugzilla.mozilla.org/show_bug.cgi?id=470982 for details.
> _______________________________________________
> dev-tech-crypto mailing list
> dev-tech-cry...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-crypto

thank you. I put myself as reviewer. Note once you have a created a bug
you can keep communication in the bug.

-glen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »