Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I've discovered for myself that java's BigInteger is very slow, so I'm trying to weakly optimize this java implementation of ed25519 which I will fork and post if successful by substituting BigInteger with jscience's LargeInteger.

I'm almost done converting all of the BigIntegers to LargeIntegers, but I still need an equivalent to BigInteger's and, and I need to know how long some byte[] variables should be and their offsets to use valueOf with byte[]s.

I could keep some of the existing code and merely convert BigIntegers to LargeIntegers, but I'd prefer to fully replace BigInteger.

"length - the maximum number of bytes to read." sounds like I should use .length of the byte[] to be converted. Is that correct? If not, what should be used?

"offset - the offset at which to start reading the bytes." sounds like I should use 0. Is that correct? If not, what should be used?

I'm 100% new to binary and cryptography.

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.