DES Algorithm - Stream Cipher Modes and JCE SUN Implementation
Part:
1
2
3
4
(Continued from previous part...)
Test Cases of DES Stream Cipher Modes
I used my testing program, JceSunDesStreamCipherTest.java, to test the cases listed in the
http://www.itl.nist.gov/fipspubs/fip81.htm:
java JceSunDesStreamCipherTest 1 -- with 8-bit CFB
Key : 0123456789ABCDEF
IV : 1234567890ABCDEF
Message : 4E6F7720697320746865
Cipher : F31FDA07011462EE187F
Expected: F31FDA07011462EE187F
java JceSunDesStreamCipherTest 2 -- with 64-bit CFB
Key : 0123456789ABCDEF
IV : 1234567890ABCDEF
Message : 4E6F77206973207468652074696D6520666F7220616C6C20
Cipher : F3096249C7F46E51A69E839B1A92F78403467133898EA622
Expected: F3096249C7F46E51A69E839B1A92F78403467133898EA622
java JceSunDesStreamCipherTest 3 -- with 8-bit OFB
Key : 0123456789ABCDEF
IV : 1234567890ABCDEF
Message : 4E6F7720697320746865
Cipher : F34A2850C9C64985D684
Expected: F34A2850C9C64985D684
java JceSunDesStreamCipherTest 4 -- with 64-bit CFB
Key : 0123456789ABCDEF
IV : 1234567890ABCDEF
Message : 4E6F77206973207468652074696D6520666F7220616C6C20
Cipher : F3096249C7F46E5135F24A242EEB3D3F3D6D5BE3255AF8C3
Expected: F3096249C7F46E5135F24A242EEB3D3F3D6D5BE3255AF8C3
Outputs of all 4 test cases match well with the expected values documented in
http://www.itl.nist.gov/fipspubs/fip81.htm.
Conclusion
- DES stream cipher modes are ways to operate DES encryption algorithm in block sizes
less than 64 bits.
- Sun JCE implementation of DES stream cipher modes work as expected.
Part:
1
2
3
4
|