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 July 2nd, 2011, 01:14 AM
Registered User
 
Join Date: Jun 2011
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Question Installing the Unrestricted Policy Files and BC provider

hi . as it is said in the book i download the Unrestricted Policy Files and add them in ext folder in both jdk and jre . but still i have this exception while running the SimplePolicyTest Code .

Code:
Exception in thread "main" java.security.InvalidKeyException: Illegal key size or default parameters
        at javax.crypto.Cipher.a(DashoA13*..)
        at javax.crypto.Cipher.init(DashoA13*..)
        at javax.crypto.Cipher.init(DashoA13*..)
        at Chapter1.SimplePolicyProject.main(SimplePolicyProject.java:39)
Java Result: 1

what can be wrong ?
by the way according to the book content i tried to install the BC provider but it was another failed attempt ..
is there any relationship between this two issues ?
regards
 
Old July 2nd, 2011, 01:30 AM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

Actually it says on page 5 "install the two JAR files it contains according to the instructions in the README file contained in the ZIP file." If you do that you should be fine.

Regards,

David
 
Old July 2nd, 2011, 02:41 AM
Registered User
 
Join Date: Jun 2011
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Default

yeah , but still i can not deal properly with the BC provider . i download the bcprov-jdk16-146.jar and copy this in all jre/lib/ext i have . i changed the java.security files to . is there any thing i should do more than this ?
 
Old July 2nd, 2011, 02:53 AM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

Can you tell me a bit more about the problem? If it's a case of it not finding the provider you need to check your path so you can be certain you are installing it in the ext directory of the JVM you are using.

Regards,

David
The Following User Says Thank You to dgh For This Useful Post:
mahdy_m_s (July 19th, 2011)
 
Old July 2nd, 2011, 03:11 AM
Registered User
 
Join Date: Jun 2011
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Default

almost all of the jre/lib/ext folders in my hard has the bcprov-jdk16-146.jar and security.provider.N=org.bouncycastle.jce.provider. BouncyCastleProvider
is added correctly(with appropriate N) at the bottom of the list of all java.security files exist in my hard .
i can see the libraries added to jdk from inside my IED(netbeans 6.9) but still i take the message "the BC provider not installed " from out Put.
it is possible that i didnot find the correct path? what else can be the problem?

Last edited by mahdy_m_s; July 2nd, 2011 at 04:43 AM..
 
Old July 3rd, 2011, 01:35 AM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

That's pretty much all it can be. You could also get the class loader confused (in some circumstances) if the jar is appearing in your class path twice.

If you're running on Windows keep in mind that a JDK install will install two JVMs. You'll need to make sure they are both updated.

Regards,

David
The Following User Says Thank You to dgh For This Useful Post:
mahdy_m_s (July 19th, 2011)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing the BC provider? boy18nj BOOK: Beginning Cryptography with Java 3 July 2nd, 2011 01:32 AM
Side effects after replacing the policy files with unlimited strength? boy18nj BOOK: Beginning Cryptography with Java 1 June 29th, 2011 08:44 PM
Appendix C, Using BC API For EC rayback_2 BOOK: Beginning Cryptography with Java 5 April 30th, 2008 10:41 PM
Installing non-assembly files in the GAC eadred .NET Framework 1.x 0 April 28th, 2006 09:12 AM
installing MSM files melvik C# 3 June 26th, 2004 07:01 PM





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