Skip to content

Commit

Permalink
Provide additional AES-ECB test patterns to enhance test coverage.
Browse files Browse the repository at this point in the history
To enhance test coverage for AES-ECB mode, we provided longer additional
testing patterns for AES-128/192/256-ECB.

Signed-off-by: Phoebe Chen <[email protected]>
  • Loading branch information
phoebesv committed Oct 6, 2023
1 parent c81fb6c commit 9c9dcb0
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/recipes/30-test_evp_data/evpciph_aes_common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ Key = 2B7E151628AED2A6ABF7158809CF4F3C
Plaintext = F69F2445DF4F9B17AD2B417BE66C3710
Ciphertext = 7B0C785E27E8AD3F8223207104725DD4

# Test AES-ECB with larger input length.
Cipher = AES-128-ECB
Key = 2B7E151628AED2A6ABF7158809CF4F3C
Plaintext = 6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A
Ciphertext = 3AD77BB40D7A3660A89ECAF32466EF973AD77BB40D7A3660A89ECAF32466EF973AD77BB40D7A3660A89ECAF32466EF973AD77BB40D7A3660A89ECAF32466EF97

# Test AES-ECB with larger input length.
Cipher = AES-128-ECB
Key = 2B7E151628AED2A6ABF7158809CF4F3C
Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51
Ciphertext = F5D3D58503B9699DE785895A96FDBAAFF5D3D58503B9699DE785895A96FDBAAFF5D3D58503B9699DE785895A96FDBAAFF5D3D58503B9699DE785895A96FDBAAFF5D3D58503B9699DE785895A96FDBAAFF5D3D58503B9699DE785895A96FDBAAFF5D3D58503B9699DE785895A96FDBAAFF5D3D58503B9699DE785895A96FDBAAF

# ECB-AES192.Encrypt and ECB-AES192.Decrypt
Cipher = AES-192-ECB
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
Expand All @@ -119,6 +131,18 @@ Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
Plaintext = F69F2445DF4F9B17AD2B417BE66C3710
Ciphertext = 9A4B41BA738D6C72FB16691603C18E0E

# Test AES-ECB with larger input length.
Cipher = AES-192-ECB
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
Plaintext = 6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A
Ciphertext = BD334F1D6E45F25FF712A214571FA5CCBD334F1D6E45F25FF712A214571FA5CCBD334F1D6E45F25FF712A214571FA5CCBD334F1D6E45F25FF712A214571FA5CC

# Test AES-ECB with larger input length.
Cipher = AES-192-ECB
Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B
Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51
Ciphertext = 974104846D0AD3AD7734ECB3ECEE4EEF974104846D0AD3AD7734ECB3ECEE4EEF974104846D0AD3AD7734ECB3ECEE4EEF974104846D0AD3AD7734ECB3ECEE4EEF974104846D0AD3AD7734ECB3ECEE4EEF974104846D0AD3AD7734ECB3ECEE4EEF974104846D0AD3AD7734ECB3ECEE4EEF974104846D0AD3AD7734ECB3ECEE4EEF

# ECB-AES256.Encrypt and ECB-AES256.Decrypt
Cipher = AES-256-ECB
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
Expand All @@ -140,6 +164,18 @@ Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
Plaintext = F69F2445DF4F9B17AD2B417BE66C3710
Ciphertext = 23304B7A39F9F3FF067D8D8F9E24ECC7

# Test AES-ECB with larger input length.
Cipher = AES-256-ECB
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
Plaintext = 6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A6BC1BEE22E409F96E93D7E117393172A
Ciphertext = F3EED1BDB5D2A03C064B5A7E3DB181F8F3EED1BDB5D2A03C064B5A7E3DB181F8F3EED1BDB5D2A03C064B5A7E3DB181F8F3EED1BDB5D2A03C064B5A7E3DB181F8F3EED1BDB5D2A03C064B5A7E3DB181F8F3EED1BDB5D2A03C064B5A7E3DB181F8F3EED1BDB5D2A03C064B5A7E3DB181F8F3EED1BDB5D2A03C064B5A7E3DB181F8F3EED1BDB5D2A03C064B5A7E3DB181F8F3EED1BDB5D2A03C064B5A7E3DB181F8

# Test AES-ECB with larger input length.
Cipher = AES-256-ECB
Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4
Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51AE2D8A571E03AC9C9EB76FAC45AF8E51
Ciphertext = 591CCB10D410ED26DC5BA74A31362870591CCB10D410ED26DC5BA74A31362870591CCB10D410ED26DC5BA74A31362870591CCB10D410ED26DC5BA74A31362870591CCB10D410ED26DC5BA74A31362870591CCB10D410ED26DC5BA74A31362870591CCB10D410ED26DC5BA74A31362870591CCB10D410ED26DC5BA74A31362870

# For all CBC encrypts and decrypts, the transformed sequence is
# AES-bits-CBC:key:IV/ciphertext':plaintext:ciphertext:encdec
# CBC-AES128.Encrypt and CBC-AES128.Decrypt
Expand Down

0 comments on commit 9c9dcb0

Please sign in to comment.