OpenCores
URL https://opencores.org/ocsvn/twofish/twofish/trunk

Subversion Repositories twofish

[/] [twofish/] [trunk/] [test_vectors/] [ECB_IVAL.TXT] - Rev 13

Compare with Previous | Blame | View Log


=========================

FILENAME:  "ecb_ival.txt"

Electronic Codebook (ECB) Mode
Intermediate Value Tests

Algorithm Name:       TWOFISH
Principal Submitter:  Bruce Schneier, Counterpane Systems

==========

KEYSIZE=128

KEY=00000000000000000000000000000000

;
;makeKey:   Input key            -->  S-box key     [Encrypt]
;             00000000 00000000  -->  00000000
;             00000000 00000000  -->  00000000
;           Subkeys
;             52C54DDE 11F0626D   Input whiten
;             7CAC9D4A 4D1B4AAA
;             B7B83A10 1E7D0BEB  Output whiten
;             EE9C341F CFE14BE4
;             F98FFEF9 9C5B3C17  Round subkeys
;             15A48310 342A4D81
;             424D89FE C14724A7
;             311B834C FDE87320
;             3302778F 26CD67B4
;             7A6C6362 C2BAF60E
;             3411B994 D972C87F
;             84ADB1EA A7DEE434
;             54D2960F A2F7CAA8
;             A6B8FF8C 8014C425
;             6A748D1C EDBAF720
;             928EF78C 0338EE13
;             9949D6BE C8314176
;             07C07D68 ECAE7EA7
;             1FE71844 85C05C89
;             F298311E 696EA672
;
PT=00000000000000000000000000000000

Encrypt()

R[-1]: x= 00000000  00000000  00000000  00000000.
R[ 0]: x= 52C54DDE  11F0626D  7CAC9D4A  4D1B4AAA.
R[ 1]: x= 52C54DDE  11F0626D  C38DCAA4  7A0A91B6.    t0=C06D4949. t1=41B9BFC1.
R[ 2]: x= 55A538DE  5C5A4DB6  C38DCAA4  7A0A91B6.    t0=7C4536B9. t1=67A58299.
R[ 3]: x= 55A538DE  5C5A4DB6  899063BD  893E49A9.    t0=60DAC1A4. t1=2D84C23D.
R[ 4]: x= 2AE61A96  84BC42D3  899063BD  893E49A9.    t0=607AAEAD. t1=6ED2DBF9.
R[ 5]: x= 2AE61A96  84BC42D3  F14F2618  821B5F36.    t0=067D0B49. t1=318EACB4.
R[ 6]: x= 0FFE0AD1  D6B87B70  F14F2618  821B5F36.    t0=58554EDB. t1=62585CF7.
R[ 7]: x= 0FFE0AD1  D6B87B70  CD0D38A1  C069BD9B.    t0=839B0017. t1=B3A89DB0.
R[ 8]: x= A85CE579  DE2661CE  CD0D38A1  C069BD9B.    t0=E9BC6975. t1=F0DDA4C3.
R[ 9]: x= A85CE579  DE2661CE  7A39754C  973ABD2A.    t0=54687CDF. t1=9044BF4B.
R[10]: x= 013077D7  B3528BA1  7A39754C  973ABD2A.    t0=77FC927F. t1=8B8678CC.
R[11]: x= 013077D7  B3528BA1  D57933FD  F8EA8B1B.    t0=E3C81108. t1=828E7493.
R[12]: x= 64F0EAA1  DA27090C  D57933FD  F8EA8B1B.    t0=B33C25D6. t1=83068533.
R[13]: x= 64F0EAA1  DA27090C  F64F1005  99149A52.    t0=A0AA2F81. t1=FFF30DB7.
R[14]: x= B0681C46  606D0273  F64F1005  99149A52.    t0=114C17C5. t1=EB143CFF.
R[15]: x= B0681C46  606D0273  EB27628F  2C51191D.    t0=677DA87D. t1=989D1459.
R[16]: x= C1708BA9  9522A3CE  EB27628F  2C51191D.    t0=9357B338. t1=AC9926BF.
R[17]: x= 5C9F589F  322C12F6  2FECBFB6  5AC3E82A.

CT=9F589F5CF6122C32B6BFEC2F2AE8C35A

Decrypt()

CT=9F589F5CF6122C32B6BFEC2F2AE8C35A


R[17]: x= 5C9F589F  322C12F6  2FECBFB6  5AC3E82A.
R[16]: x= C1708BA9  9522A3CE  EB27628F  2C51191D.    t0=9357B338. t1=AC9926BF.
R[15]: x= B0681C46  606D0273  EB27628F  2C51191D.    t0=677DA87D. t1=989D1459.
R[14]: x= B0681C46  606D0273  F64F1005  99149A52.    t0=114C17C5. t1=EB143CFF.
R[13]: x= 64F0EAA1  DA27090C  F64F1005  99149A52.    t0=A0AA2F81. t1=FFF30DB7.
R[12]: x= 64F0EAA1  DA27090C  D57933FD  F8EA8B1B.    t0=B33C25D6. t1=83068533.
R[11]: x= 013077D7  B3528BA1  D57933FD  F8EA8B1B.    t0=E3C81108. t1=828E7493.
R[10]: x= 013077D7  B3528BA1  7A39754C  973ABD2A.    t0=77FC927F. t1=8B8678CC.
R[ 9]: x= A85CE579  DE2661CE  7A39754C  973ABD2A.    t0=54687CDF. t1=9044BF4B.
R[ 8]: x= A85CE579  DE2661CE  CD0D38A1  C069BD9B.    t0=E9BC6975. t1=F0DDA4C3.
R[ 7]: x= 0FFE0AD1  D6B87B70  CD0D38A1  C069BD9B.    t0=839B0017. t1=B3A89DB0.
R[ 6]: x= 0FFE0AD1  D6B87B70  F14F2618  821B5F36.    t0=58554EDB. t1=62585CF7.
R[ 5]: x= 2AE61A96  84BC42D3  F14F2618  821B5F36.    t0=067D0B49. t1=318EACB4.
R[ 4]: x= 2AE61A96  84BC42D3  899063BD  893E49A9.    t0=607AAEAD. t1=6ED2DBF9.
R[ 3]: x= 55A538DE  5C5A4DB6  899063BD  893E49A9.    t0=60DAC1A4. t1=2D84C23D.
R[ 2]: x= 55A538DE  5C5A4DB6  C38DCAA4  7A0A91B6.    t0=7C4536B9. t1=67A58299.
R[ 1]: x= 52C54DDE  11F0626D  C38DCAA4  7A0A91B6.    t0=C06D4949. t1=41B9BFC1.
R[ 0]: x= 52C54DDE  11F0626D  7CAC9D4A  4D1B4AAA.
R[-1]: x= 00000000  00000000  00000000  00000000.

PT=00000000000000000000000000000000

==========

KEYSIZE=192

KEY=0123456789ABCDEFFEDCBA98765432100011223344556677

;
;makeKey:   Input key            -->  S-box key     [Encrypt]
;             EFCDAB89 67452301  -->  B89FF6F2
;             10325476 98BADCFE  -->  B255BC4B
;             77665544 33221100  -->  45661061
;           Subkeys
;             38394A24 C36D1175   Input whiten
;             E802528F 219BFEB4
;             B9141AB4 BD3E70CD  Output whiten
;             AF609383 FD36908A
;             03EFB931 1D2EE7EC  Round subkeys
;             A7489D55 6E44B6E8
;             714AD667 653AD51F
;             B6315B66 B27C05AF
;             A06C8140 9853D419
;             4016E346 8D1C0DD4
;             F05480BE B6AF816F
;             2D7DC789 45B7BD3A
;             57F8A163 2BEFDA69
;             26AE7271 C2900D79
;             ED323794 3D3FFD80
;             5DE68E49 9C3D2478
;             DF326FE3 5911F70D
;             C229F13B B1364772
;             4235364D 0CEC363A
;             57C8DD1F 6A1AD61E
;
PT=00000000000000000000000000000000

Encrypt()

R[-1]: x= 00000000  00000000  00000000  00000000.
R[ 0]: x= 38394A24  C36D1175  E802528F  219BFEB4.
R[ 1]: x= 38394A24  C36D1175  9C263D67  5E68BE8F.    t0=988C8223. t1=33D1ECEC.
R[ 2]: x= C8F5099F  0C4B8F53  9C263D67  5E68BE8F.    t0=E8C880BC. t1=19C23B0A.
R[ 3]: x= C8F5099F  0C4B8F53  69948F5E  E67C030F.    t0=C615F1F6. t1=17AE5B7E.
R[ 4]: x= 07633866  59421079  69948F5E  E67C030F.    t0=90AB32AA. t1=7F56EB43.
R[ 5]: x= 07633866  59421079  C015BE79  149B9CEC.    t0=52971E00. t1=F6BC546D.
R[ 6]: x= A042B99D  709EF54B  C015BE79  149B9CEC.    t0=DAA00849. t1=2D2F5FCE.
R[ 7]: x= A042B99D  709EF54B  0CD39FA6  B250BEDA.    t0=EE03FB5B. t1=FB5A051C.
R[ 8]: x= F7B097FA  9E5C4FF7  0CD39FA6  B250BEDA.    t0=09A1B597. t1=18041948.
R[ 9]: x= F7B097FA  9E5C4FF7  77FC8B29  CC2B3F88.    t0=99C9694E. t1=F1687F43.
R[10]: x= A279C718  421A8D38  77FC8B29  CC2B3F88.    t0=5D174956. t1=2F7D5E04.
R[11]: x= A279C718  421A8D38  5B1A0904  12FEBF99.    t0=5BC40012. t1=78D2617B.
R[12]: x= E4409C22  702548A2  5B1A0904  12FEBF99.    t0=C251B3CE. t1=4AC0BD46.
R[13]: x= E4409C22  702548A2  5DDAA2A1  EFB2F051.    t0=91BC2070. t1=6FC0BBF3.
R[14]: x= 8561A604  825D2480  5DDAA2A1  EFB2F051.    t0=A7D24F8E. t1=84878F62.
R[15]: x= 8561A604  825D2480  5CC6CB7B  62A2CE64.    t0=93690387. t1=0EB8FA83.
R[16]: x= 17738CD3  B5142D18  5CC6CB7B  62A2CE64.    t0=5FE8370B. t1=F3D5AB78.
R[17]: x= E5D2D1CF  DF9CBEA9  B8131F50  4822BD92.

CT=CFD1D2E5A9BE9CDF501F13B892BD2248

Decrypt()

CT=CFD1D2E5A9BE9CDF501F13B892BD2248


R[17]: x= E5D2D1CF  DF9CBEA9  B8131F50  4822BD92.
R[16]: x= 17738CD3  B5142D18  5CC6CB7B  62A2CE64.    t0=5FE8370B. t1=F3D5AB78.
R[15]: x= 8561A604  825D2480  5CC6CB7B  62A2CE64.    t0=93690387. t1=0EB8FA83.
R[14]: x= 8561A604  825D2480  5DDAA2A1  EFB2F051.    t0=A7D24F8E. t1=84878F62.
R[13]: x= E4409C22  702548A2  5DDAA2A1  EFB2F051.    t0=91BC2070. t1=6FC0BBF3.
R[12]: x= E4409C22  702548A2  5B1A0904  12FEBF99.    t0=C251B3CE. t1=4AC0BD46.
R[11]: x= A279C718  421A8D38  5B1A0904  12FEBF99.    t0=5BC40012. t1=78D2617B.
R[10]: x= A279C718  421A8D38  77FC8B29  CC2B3F88.    t0=5D174956. t1=2F7D5E04.
R[ 9]: x= F7B097FA  9E5C4FF7  77FC8B29  CC2B3F88.    t0=99C9694E. t1=F1687F43.
R[ 8]: x= F7B097FA  9E5C4FF7  0CD39FA6  B250BEDA.    t0=09A1B597. t1=18041948.
R[ 7]: x= A042B99D  709EF54B  0CD39FA6  B250BEDA.    t0=EE03FB5B. t1=FB5A051C.
R[ 6]: x= A042B99D  709EF54B  C015BE79  149B9CEC.    t0=DAA00849. t1=2D2F5FCE.
R[ 5]: x= 07633866  59421079  C015BE79  149B9CEC.    t0=52971E00. t1=F6BC546D.
R[ 4]: x= 07633866  59421079  69948F5E  E67C030F.    t0=90AB32AA. t1=7F56EB43.
R[ 3]: x= C8F5099F  0C4B8F53  69948F5E  E67C030F.    t0=C615F1F6. t1=17AE5B7E.
R[ 2]: x= C8F5099F  0C4B8F53  9C263D67  5E68BE8F.    t0=E8C880BC. t1=19C23B0A.
R[ 1]: x= 38394A24  C36D1175  9C263D67  5E68BE8F.    t0=988C8223. t1=33D1ECEC.
R[ 0]: x= 38394A24  C36D1175  E802528F  219BFEB4.
R[-1]: x= 00000000  00000000  00000000  00000000.

PT=00000000000000000000000000000000

==========

KEYSIZE=256

KEY=0123456789ABCDEFFEDCBA987654321000112233445566778899AABBCCDDEEFF

;
;makeKey:   Input key            -->  S-box key     [Encrypt]
;             EFCDAB89 67452301  -->  B89FF6F2
;             10325476 98BADCFE  -->  B255BC4B
;             77665544 33221100  -->  45661061
;             FFEEDDCC BBAA9988  -->  8E4447F7
;           Subkeys
;             5EC769BF 44D13C60   Input whiten
;             76CD39B1 16750474
;             349C294B EC21F6D6  Output whiten
;             4FBD10B4 578DA0ED
;             C3479695 9B6958FB  Round subkeys
;             6A7FBC4E 0BF1830B
;             61B5E0FB D78D9730
;             7C6CF0C4 2F9109C8
;             E69EA8D1 ED99BDFF
;             35DC0BBD A03E5018
;             FB18EA0B 38BD43D3
;             76191781 37A9A0D3
;             72427BEA 911CC0B8
;             F1689449 71009CA9
;             B6363E89 494D9855
;             590BBC63 F95A28B5
;             FB72B4E1 2A43505C
;             BFD34176 5C133D12
;             3A9247F7 9A3331DD
;             EE7515E6 F0D54DCD
;
PT=00000000000000000000000000000000

Encrypt()

R[-1]: x= 00000000  00000000  00000000  00000000.
R[ 0]: x= 5EC769BF  44D13C60  76CD39B1  16750474.
R[ 1]: x= 5EC769BF  44D13C60  D38B6C9F  A23B7169.    t0=29C0736C. t1=E4D3D68D.
R[ 2]: x= 99424DFF  FBC14BFC  D38B6C9F  A23B7169.    t0=9D16BBB3. t1=64AD7A3F.
R[ 3]: x= 99424DFF  FBC14BFC  698BE047  6A997290.    t0=E66B9D19. t1=B87B2DFD.
R[ 4]: x= 2C125DD7  5A526278  698BE047  6A997290.    t0=0BB41F61. t1=3945E62C.
R[ 5]: x= 2C125DD7  5A526278  E35CD910  7CB57D06.    t0=D5397903. t1=F35A3092.
R[ 6]: x= D5178F25  00D35CC5  E35CD910  7CB57D06.    t0=8C8927A1. t1=C3D8103E.
R[ 7]: x= D5178F25  00D35CC5  D8447F91  65C2BD96.    t0=4D8B7489. t1=0B2FC79F.
R[ 8]: x= FF92E109  DF621C97  D8447F91  65C2BD96.    t0=C1176720. t1=F301CE95.
R[ 9]: x= FF92E109  DF621C97  28BFEFF5  D45666FB.    t0=9F3BEC03. t1=77BD388E.
R[10]: x= BB79AD2E  AA410F41  28BFEFF5  D45666FB.    t0=8C6DB451. t1=0B8B72BA.
R[11]: x= BB79AD2E  AA410F41  6576A3ED  BFF8215E.    t0=8A317EF8. t1=A1EAEAAE.
R[12]: x= 4A6BBAFF  439F4766  6576A3ED  BFF8215E.    t0=8F8307AA. t1=472014C3.
R[13]: x= 4A6BBAFF  439F4766  F7186836  04CA5304.    t0=CEB0BBE1. t1=C12302BE.
R[14]: x= CBD3C29D  BC31FEBE  F7186836  04CA5304.    t0=5CF5C93C. t1=C1033512.
R[15]: x= CBD3C29D  BC31FEBE  D4E77B7C  5415D5D3.    t0=853A6BB2. t1=9F09EB26.
R[16]: x= 85411C2B  7777DC05  D4E77B7C  5415D5D3.    t0=877AF61D. t1=4B61EEC7.
R[17]: x= E07B5237  B8342305  CAFC0C9F  20FA7CE8.

CT=37527BE0052334B89F0CFCCAE87CFA20

Decrypt()

CT=37527BE0052334B89F0CFCCAE87CFA20


R[17]: x= E07B5237  B8342305  CAFC0C9F  20FA7CE8.
R[16]: x= 85411C2B  7777DC05  D4E77B7C  5415D5D3.    t0=877AF61D. t1=4B61EEC7.
R[15]: x= CBD3C29D  BC31FEBE  D4E77B7C  5415D5D3.    t0=853A6BB2. t1=9F09EB26.
R[14]: x= CBD3C29D  BC31FEBE  F7186836  04CA5304.    t0=5CF5C93C. t1=C1033512.
R[13]: x= 4A6BBAFF  439F4766  F7186836  04CA5304.    t0=CEB0BBE1. t1=C12302BE.
R[12]: x= 4A6BBAFF  439F4766  6576A3ED  BFF8215E.    t0=8F8307AA. t1=472014C3.
R[11]: x= BB79AD2E  AA410F41  6576A3ED  BFF8215E.    t0=8A317EF8. t1=A1EAEAAE.
R[10]: x= BB79AD2E  AA410F41  28BFEFF5  D45666FB.    t0=8C6DB451. t1=0B8B72BA.
R[ 9]: x= FF92E109  DF621C97  28BFEFF5  D45666FB.    t0=9F3BEC03. t1=77BD388E.
R[ 8]: x= FF92E109  DF621C97  D8447F91  65C2BD96.    t0=C1176720. t1=F301CE95.
R[ 7]: x= D5178F25  00D35CC5  D8447F91  65C2BD96.    t0=4D8B7489. t1=0B2FC79F.
R[ 6]: x= D5178F25  00D35CC5  E35CD910  7CB57D06.    t0=8C8927A1. t1=C3D8103E.
R[ 5]: x= 2C125DD7  5A526278  E35CD910  7CB57D06.    t0=D5397903. t1=F35A3092.
R[ 4]: x= 2C125DD7  5A526278  698BE047  6A997290.    t0=0BB41F61. t1=3945E62C.
R[ 3]: x= 99424DFF  FBC14BFC  698BE047  6A997290.    t0=E66B9D19. t1=B87B2DFD.
R[ 2]: x= 99424DFF  FBC14BFC  D38B6C9F  A23B7169.    t0=9D16BBB3. t1=64AD7A3F.
R[ 1]: x= 5EC769BF  44D13C60  D38B6C9F  A23B7169.    t0=29C0736C. t1=E4D3D68D.
R[ 0]: x= 5EC769BF  44D13C60  76CD39B1  16750474.
R[-1]: x= 00000000  00000000  00000000  00000000.

PT=00000000000000000000000000000000

==========

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.