[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNU Crypto] Re: [Classpathx-crypto] Problem/Bug in gnu-crypto-1.0.0
From: |
Raif S. Naffah |
Subject: |
Re: [GNU Crypto] Re: [Classpathx-crypto] Problem/Bug in gnu-crypto-1.0.0 |
Date: |
Fri, 8 Nov 2002 22:41:28 +1100 |
User-agent: |
KMail/1.4.3 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
On Friday 08 November 2002 04:50, Raif S. Naffah wrote:
> On Thursday 07 November 2002 05:39, Casey Marshall wrote:
> > Stefan Prelle wrote:
> > > ...
> > > Another quick question: How to I save/restore a generated
> > > Key to/from a bytebuffer? My first guess was the method
> > > "getEncoded" in combination but that didn't work.
> >
> > ...
> > The DSS*Key classes also have the getEncoded() and the
> > valueOf(byte[]) methods, which translate keys to/from byte arrays.
> > The problem here is that the latter method doesn't actually work
> > (they check for the wrong magic number at the start of the input).
> >
> > Which brings up a good point for the list: the valueOf() methods in
> > the DSS classes don't work, since they check for the magic values
> > "GSDA" and "GSDB", when it appears the correct values are "GNUA"
> > and "GNUa".
> >
> > In the meantime the attached diff should fix this.
>
> i'll fix this to use a constant from Registry and add a JUnit test
> case. i'll also ensure the same is in place for RSA sig.
done.
affected classes are:
+ source/gnu/crypto/Registry.java
+ source/gnu/crypto/sig/BaseSignature.java
+ source/gnu/crypto/sig/IKeyPairCodec.java
+ source/gnu/crypto/sig/ISignatureCodec.java
+ source/gnu/crypto/sig/dss/DSSKeyPairRawCodec.java
+ source/gnu/crypto/sig/dss/DSSSignature.java
+ source/gnu/crypto/sig/dss/DSSSignatureRawCodec.java
+ source/gnu/crypto/sig/rsa/GnuRSAPrivateKey.java
+ source/gnu/crypto/sig/rsa/RSAPSSSignatureRawCodec.java
+ source/test/sig/dss/TestOfDSSCodec.java
+ source/test/sig/dss/TestOfDSSSignature.java
+ source/test/sig/rsa/TestOfRSACodec.java
+ source/test/sig/rsa/TestOfRSAPSSSignature.java
make/ant test should now end with:
OK (108 tests)
cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique
iD8DBQE9y6Lw+e1AKnsTRiERA5VpAKDurlzQWUijQCrYay2GnGdfdpVYCACfRFV4
BSKkVhSmR2jly0DsuBL6Ncg=
=o7ri
-----END PGP SIGNATURE-----