Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > BOOK: Beginning Cryptography with Java
|
BOOK: Beginning Cryptography with Java
This is the forum to discuss the Wrox book Beginning Cryptography with Java by David Hook; ISBN: 9780764596339
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Cryptography with Java section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 23rd, 2007, 04:16 PM
Authorized User
 
Join Date: Jan 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default specification string for RSA cipher

I've just finished the RSA chapter ( 4 ) and have a question regarding the specification string given to the cipher factory method. Consider the following RSA specificaiton string, from the OAEP sample:

      Cipher.getInstance("RSA/NONE/OAEPWithSHA1AndMGF1Padding", "BC");

My question concerns the "NONE" element of this string. Based upon the strings for the symmetric algorthms in chapter two, I would guess this "NONE" to be the MODE. But do RSA ciphers even have "modes"? Are any discussed in the RSA chapter? Maybe I missed them.

 
Old January 23rd, 2007, 06:05 PM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

As you've assumed RSA cipher don't have modes.

The JCE requires something appears in the mode area - ie. all ciphers have to be described as algorithm/mode/padding or just algorithm. For this reason you'll also see RSA/ECB/... as NONE was a recent addition.

Regards,

David

 
Old January 23rd, 2007, 06:44 PM
Authorized User
 
Join Date: Jan 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks David, and, by the way, good book!

I have a couple of questions in response to your previous answer.

1) When I execute the program that displays all of the available ciphers supported by BC I find the following RSA info among the output:

Cipher: RSA//PKCS1PADDING

Cipher: RSA/OAEP

Cipher: RSA/RAW

So these would all require a specification string of the form RSA/NONE/padding ?

2) You said that I might see RSA/ECB/padding, instead of none. Is this because RSA is doing some sort of ECB? I assume you mean that it ECB was just used as a default filler for the mode space.

 
Old January 23rd, 2007, 07:31 PM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

On 1, they only exist as they were accessible from the original clean room provider (we weren't aware of the restriction when it was implemented). The official JCE doesn't allow such strings to be used.

0n 2, ECB is meaningless with RSA - it was simply used in the absence of any other available qualifier, the official use of NONE wasn't introduced till much later,

Regards,

David






Similar Threads
Thread Thread Starter Forum Replies Last Post
Computed Column Specification olisav ASP.NET 2.0 Basics 0 May 14th, 2007 04:00 PM
encrypting the xml file using asymmetric cipher sachinkataria Pro Java 0 July 18th, 2006 08:28 AM
Invalid authorization specification rcatal01 JSP Basics 10 April 20th, 2005 09:02 AM
Bounce-path Specification pavanp .NET Web Services 0 February 1st, 2005 10:39 AM
RSA ajm235 C++ Programming 1 August 19th, 2004 01:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.