开发者

Need library for the 3-DES cipher that supports 1-bit feedback cipher modes

开发者 https://www.devze.com 2023-03-07 07:32 出处:网络
I couldn\'t find a java library that supports the CFB, OFB or CBC mode in the 1开发者_如何学Go-bit stream mode.

I couldn't find a java library that supports the CFB, OFB or CBC mode in the 1开发者_如何学Go-bit stream mode.

So far, the libraries I've tried (BouncyCastle and IAIK) only support ranges 8-64.


[clean sweep of old questions]

I'm not aware of any crypto libraries for Java that are bit oriented (in other words, all are byte oriented), so you will have to use the block ciphers directly (or at least at a quite low level) to be able to do this.

Beware that interfacing with self implemented classes is tricky, you probably should use a byte[] as buffer argument and an int or long to return the number of bits that have been stored in the buffer. There is not bit-oriented stream either, although you could create one. Or you could use the venerable, old and never used BitSet class. But the interface will be a pain whatever you choose. This is probably why everybody focusses on bytes.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号