public inbox for java-prs@sourceware.org help / color / mirror / Atom feed
From: "r_ovidius at eml dot cc" <gcc-bugzilla@gcc.gnu.org> To: java-prs@gcc.gnu.org Subject: [Bug libgcj/27228] New: java.security.InvalidAlgorithmParameterException Date: Thu, 20 Apr 2006 20:53:00 -0000 [thread overview] Message-ID: <bug-27228-7936@http.gcc.gnu.org/bugzilla/> (raw) Originally from jsch (jcraft.com) com/jcraft/jsch/jce/DH.java getE() This function works in Sun's java, but on libgcj it fails. Here is a standalone sample that works in Sun's java: (I believe this used to work with gnu.crypto) gcj (GCC) 4.2.0 20060419 (experimental) gcj --main=Sec -o Sec Sec.java ./Sec java.security.InvalidAlgorithmParameterException: params at gnu.javax.crypto.jce.sig.DHKeyPairGeneratorSpi.initialize (libgcj.so.7) at java.security.KeyPairGenerator.initialize (libgcj.so.7) at Sec.main (Sec) ===== public class Sec { private static KeyPairGenerator myKpairGen; private static KeyAgreement myKeyAgree; private static BigInteger p; private static BigInteger g; private static BigInteger e; // my public key private static byte[] e_array; public static void main(String[] args) { try { myKpairGen = KeyPairGenerator.getInstance("DH"); myKeyAgree = KeyAgreement.getInstance("DH"); p = new BigInteger("1797693134862315907708391567937874531978602960487560117064444236841971802161585193689478337958649255415021805654 859805036464405481992391000507928770033558166392295531362390765087357599148225748625750074253020774477125895509579377784244424266173347276 29299387668709205606050270810842907692932019128194467627007"); g = new BigInteger("2"); DHParameterSpec dhSkipParamSpec = new DHParameterSpec(p, g); myKpairGen.initialize(dhSkipParamSpec); KeyPair myKpair = myKpairGen.generateKeyPair(); myKeyAgree.init(myKpair.getPrivate()); // BigInteger x=((javax.crypto.interfaces.DHPrivateKey)(myKpair.getPrivate())).getX(); byte[] myPubKeyEnc = myKpair.getPublic().getEncoded(); System.err.println(myPubKeyEnc); e = ((javax.crypto.interfaces.DHPublicKey) (myKpair.getPublic())).getY(); e_array = e.toByteArray(); } catch (Exception e) { e.printStackTrace(); } } } -- Summary: java.security.InvalidAlgorithmParameterException Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: r_ovidius at eml dot cc http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27228
next reply other threads:[~2006-04-20 20:53 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-04-20 20:53 r_ovidius at eml dot cc [this message] 2006-04-20 22:16 ` [Bug libgcj/27228] java.security.InvalidAlgorithmParameterException tromey at gcc dot gnu dot org 2006-04-20 22:16 ` tromey at gcc dot gnu dot org 2006-04-20 23:08 ` tromey at gcc dot gnu dot org 2006-04-20 23:14 ` [Bug crypto/27228] java.security.InvalidAlgorithmParameterException tromey at gcc dot gnu dot org 2006-04-21 2:30 ` csm at gnu dot org 2006-04-21 5:02 ` r_ovidius at eml dot cc 2006-04-21 6:37 ` csm at gnu dot org 2006-04-22 18:11 ` cvs-commit at developer dot classpath dot org 2006-04-22 19:18 ` david at jpackage dot org 2006-04-22 19:26 ` csm at gnu dot org 2006-07-22 0:31 ` raif at swiftdsl dot com dot au 2006-07-22 5:23 ` csm at gnu dot org 2006-07-24 10:58 ` raif at swiftdsl dot com dot au
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-27228-7936@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=java-prs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).