Re: Howto generate configure?

2006-07-20 Thread Morgon Kanter
Run the script "autogen.sh", which should be in the top-level directory 
of classpath.

> I would like to try out Classpath-CVS to experiment a bit with Roman's
> great xawt-implementation.
> However in CVS there are no scripts like configure available, so I
> tried autoconf (thats usually what I type in if I don't find these
> file *lol*), however I get messages like this:
> 
> configure.ac:40: error: possibly undefined macro: AM_INIT_AUTOMAKE
>   If this token and others are legitimate, please use 
m4_pattern_allow.
>   See the Autoconf documentation.
> configure.ac:56: error: possibly undefined macro: AM_CONDITIONAL
> 
> I am completly undereducated when it comes down to the whole
> make/automake stuff, so yes I am ashamed because of this mail ;-)
> 
> Any help would be really welcome, thank you in advance.
> 
> lg Clemens

-- 
Morgon Kanter   <[EMAIL PROTECTED]>



Re: [crypto] OAEP, EME-OAEP, RC4

2006-06-08 Thread Morgon Kanter
John Pritchard wrote:
> A couple classes I'm moving into classpath::crypto/ciphers: OAEP, 
> EME-OAEP (and it looks like there's no RC4 there). 

ARCFour is there, check the prng dir.

-- 
Morgon Kanter   <[EMAIL PROTECTED]>



GOST cipher & related added.

2006-06-04 Thread Morgon Kanter
Of course, this had to come at about the same time that Raif made a 
bunch of changes to various crypto-related files and scared the hell 
out of me thinking that I was suddenly going to have a merge 
conflict. :-P

In general:

The full output of cvs diff -uN classpath > blah is available here:
http://www.surgo.net/classpath/cvsdiffoutput.diff

For some reason, the -N option doesn't seem to be working so the 
additional files are all available here:
http://www.surgo.net/classpath/GOST.java
http://www.surgo.net/classpath/GOSTSpi.java
http://www.surgo.net/classpath/GOSTKeyGeneratorImpl.java
http://www.surgo.net/classpath/GOSTSecretKeyFactoryImpl.java
http://www.surgo.net/classpath/OMacGOSTImpl.java
(Where to put them is said in the top of the diff file, at least.)


Sum of changes:

* Complete addition of the GOST block cipher.
* Addition of method addTwoUnsignedIntegers to Util.java
* Addition of method copyIntToBytes to Util.java
(More than one other file duplicates this functionality unnecessarily.)
* Addition of method toIntFromBytes to Util.java
(More than one other file duplicates this functionality unnecessarily.)
* Making PBES2.java use only one coding style.

I'll get to modifying the duplicates in the other files to use the new 
Util.java code one of these days, it didn't seem proper to put it in 
with this change.


On my GOST implementation:

I'd really like Casey or Raif or both to check this to make sure it 
actually works as it's supposed to. It decrypts what it encrypts, but 
testing to actually make sure that the encryption function works as 
it's supposed to is made quite difficult by the lack of official test 
vectors. It seems correct, everything is done exactly as described in 
Schneier's book and the translated spec, but looks can be deceiving and 
the lack of test vectors is a real pain. If it means anything, all of 
the implementation problems I had (stuff not decrypting correctly) were 
due to stupid things I did in Util.java, not GOST.java. All of which 
have obviously been corrected now, and in correcting I compared my 
implementation to the specification MANY times.

Do note that most implementations of GOST will not generate working test 
vectors for my implementation due to different S-Boxes; they're all 
based on the code in the back of Applied Cryptography (reference [1] in 
GOST.java), which contains different S-Boxes than the ones actually 
specified in Applied Cryptography (which are the ones that I've used 
for my implementaton).

I wrote a Mauve test case to make sure things decrypted correctly, but 
Mauve doesn't seem to work for me (every block cipher times out), so I 
just wrote this to test and print stuff:
http://www.surgo.net/classpath/test.java

I took that specific vector from crypto++ (public domain), but again, no 
idea what the ciphertext there is supposed to mean. It might not mean 
anything: crypto++ has an implementation using four 256-element lookup 
tables instead of S-Boxes; I also didn't see that 11-bit left-circular 
shift at the end, but this could easily be due to the tables. So, once 
again, I'd appreciate it if Casey or Raif or both could double-check my 
implementation.


Difficulties found while implementing this:

(1) The number of files you have to modify to add a single block cipher, 
while managable, is excessive. It would be great if we could just 
modify (Registry) and have everything derived from there. Failing that, 
there really needs to be documentation on how to add these things -- I 
just grepped all of classpath for "blowfish" and added GOST in 
everywhere blowfish was.

(2) The file gnu/javax/crypto/jce/cipher/PBES2.java is absolutely out of 
hand. This ties into (1) but is even worse if you want to add a new 
one-way hash function to the library. A part of me says that there has 
to be a better way to do this, but I'm not sure, mostly because I don't 
know how any of the HMac infrastructure works. All of the problems with 
this file carry over to the gnu/javax/crypto/jce/GnuCrypto.java file.

It looks to me like the only thing this loong use of static inner 
classes is for is for setting up the GnuCrypto provider for PBES2 
ciphers. Could this not be done instead with some sort of much more 
easy-to-manage list (the data type), possibly one that fills itself 
from (Registry)? Casey, Raif, what do you guys think of this?

(3) There are also a good deal of nearly-empty files you have to add 
when you add a new block cipher, mostly due to the JCE interface. It 
looks to me like a lot of the work could be done by an AWK or Perl 
script. Not necessarily a complaint per-se (I guess it's a necessary 
evil of implementing JCE), just a comment.


Well, that's all for now.
-- 
Morgon Kanter   <[EMAIL PROTECTED]>


pgpZRxNHNxsP2.pgp
Description: PGP signature


Re: ATTENTION: Prospect of merging HEAD with the generics branch

2006-06-02 Thread Morgon Kanter
Andrew John Hughes wrote:
> From the above e-mail, it looks as if gcj will shortly be linking in 
> ecj as its front end.  With this, gcj will be able to handle 1.5 
constructs.

> What do people think of now beginning the merge of the generics branch
> back on to HEAD?

If the ability to compile it is there, I'm all for it. I see no reason 
to keep them off of HEAD as long as gcj can compile them.
-- 
Morgon Kanter   <[EMAIL PROTECTED]>


pgp3wzlQPRTL7.pgp
Description: PGP signature


Re: "Sun Says GPL Is a Possibility for OSS Java":would be great

2006-06-01 Thread Morgon Kanter
Audrius Meskauskas wrote:
> Also, I think, GNU Classpath is written well enough to think about 
> merging rather than about the direct replacement of our classes by 
> that Sun has released.

Direct replacement would be unlikely anyway, as Sun would not assign 
their copyright to the FSF.

But regardless, we haven't really seen Sun taking any action yet.

-- 
Morgon Kanter   <[EMAIL PROTECTED]>



Room for more block ciphers?

2006-05-31 Thread Morgon Kanter
Hello,

Somewhat recently, the gnu-crypto project got merged into Classpath. As 
I live in a cave underground and only come out once every few months, I 
was unaware of this and working on a few new block cipher 
implementations for gnu-crypto, using their old CVS sources.

The old homepage of gnu-crypto said that they were looking for someone 
to add in the NESSIE phase 2 algorithms; this hasn't been done yet, 
from what I see in both the gnu-crypto and classpath CVS. I'd be happy 
to write implementations of these, but the obvious question is: would 
these, and other, new block ciphers even be wanted in Classpath? It 
looks like all of gnu-crypto was merged in, but the merge announcement 
contains the following:

"[W]e would entertain reviving GNU Crypto if someone wanted to continue 
developing it for other purposes (that is, if you have a use for GNU 
Crypto outside of Classpath's more narrow goal of completing its JCE 
providers)"

Which implies that further ciphers wouldn't be wanted or needed for 
Classpath. So, yes, my question is: would new block ciphers be wanted 
in Classpath?

Thanks.
-- Morgon