Wrox Programmer Forums
|
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 June 5th, 2011, 10:16 PM
Authorized User
 
Join Date: Jun 2011
Posts: 38
Thanks: 9
Thanked 0 Times in 0 Posts
Default PKCS5Scheme1Test?

I don't know how we map the compatible input cipher to output cipher.
Do we have any such chart or property table which says encrypt cipher "PBEWithSHA1AndDES" works with decrypt cipher "DES/CBC/PKCS5Padding"?
Because we can't map randomly any algorithm/mode/padding from encrypt to decrypt cipher.
Code:
        // encryption step using regular PBE
        Cipher           cipher = Cipher.getInstance("PBEWithSHA1AndDES","BC");


        // decryption step - using the local implementation
        cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
 
Old June 19th, 2011, 06:48 PM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

The Sun, or rather Oracle, provided documentation for the JCE defines a set of standard names for algorithms and what they are defined from. Outside of the standard definitions you need to examine the documentation provided with the JCE provider as they may vary. The common PBE schemes are derived from PKCS#5 and PKCS#12.

Regards,

David









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