Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test broken on OpenSUSE/leap #17

Open
JamesB192 opened this issue May 19, 2022 · 0 comments
Open

Test broken on OpenSUSE/leap #17

JamesB192 opened this issue May 19, 2022 · 0 comments

Comments

@JamesB192
Copy link

# ./runtests --rerun-failed --output-on-failure
runtests: /libaes_siv/tests.c:78: test_malloc_failure: Assertion `ret == 1' failed.
Aborted (core dumped)

OpenSUSE is doing something funky with its OpenSSL package. It appears to Fire up openssl_malloc before CRYPTO_set_mem_functions can replace it. Other than that problem, it seems to run great. What is the play?

# make runtests
Consolidate compiler generated dependencies of target runtests
[ 33%] Building C object CMakeFiles/runtests.dir/tests.c.o
/libaes_siv/tests.c:69:13: warning: 'test_malloc_failure' defined but not used [-Wunused-function]
   69 | static void test_malloc_failure(void) {
      |             ^~~~~~~~~~~~~~~~~~~
[ 66%] Linking C executable runtests
[100%] Built target runtests
# ./runtests --rerun-failed --output-on-failure
Test cleanup before free: OK
Test vector 1:
             key: fffefdfc fbfaf9f8 f7f6f5f4 f3f2f1f0 
                  f0f1f2f3 f4f5f6f7 f8f9fafb fcfdfeff 
              AD: 10111213 14151617 18191a1b 1c1d1e1f 
                  20212223 24252627 
       plaintext: 11223344 55667788 99aabbcc ddee
 exp. ciphertext: 85632d07 c6e8f37f 950acd32 0a2ecc93 
                  40c02b96 90c4dc04 daef7f6a fe5c
Encryption:
      CMAC(zero): 0e04dfaf c1efbf04 01405828 59bf073a 
        double(): 1c09bf5f 83df7e08 0280b050 b37e0e74 
        CMAC(ad): f1f922b7 f5193ce6 4ff80cb4 7d93f23b 
             xor: edf09de8 76c642ee 4d78bce4 ceedfc4f 
             pad: 11223344 55667788 99aabbcc ddee8000 
             xor: cac30894 b8eaf254 035bc205 40357819 
     CMAC(final): 85632d07 c6e8f37f 950acd32 0a2ecc93 
      ciphertext: 40c02b96 90c4dc04 daef7f6a fe5c
         IV || C: 85632d07 c6e8f37f 950acd32 0a2ecc93 
                  40c02b96 90c4dc04 daef7f6a fe5c
Decryption:
      CMAC(zero): 0e04dfaf c1efbf04 01405828 59bf073a 
        double(): 1c09bf5f 83df7e08 0280b050 b37e0e74 
        CMAC(ad): f1f922b7 f5193ce6 4ff80cb4 7d93f23b 
             xor: edf09de8 76c642ee 4d78bce4 ceedfc4f 
       plaintext: 11223344 55667788 99aabbcc ddee
             pad: 11223344 55667788 99aabbcc ddee8000 
             xor: cac30894 b8eaf254 035bc205 40357819 
     CMAC(final): 85632d07 c6e8f37f 950acd32 0a2ecc93 
       plaintext: 11223344 55667788 99aabbcc ddee
Test vector 2:
             key: 7f7e7d7c 7b7a7978 77767574 73727170 
                  40414243 44454647 48494a4b 4c4d4e4f 
             AD1: 00112233 44556677 8899aabb ccddeeff 
                  deaddada deaddada ffeeddcc bbaa9988 
                  77665544 33221100 
             AD2: 10203040 50607080 90a0
           nonce: 09f91102 9d74e35b d84156c5 635688c0 
       plaintext: 74686973 20697320 736f6d65 20706c61 
                  696e7465 78742074 6f20656e 63727970 
                  74207573 696e6720 5349562d 414553
 exp. ciphertext: 7bdb6e3b 432667eb 06f4d14b ff2fbd0f 
                  cb900f2f ddbe4043 26601965 c889bf17 
                  dba77ceb 094fa663 b7a3f748 ba8af829 
                  ea64ad54 4a272e9c 485b62a3 fd5c0d
Encryption:
      CMAC(zero): c8b43b59 74960e7c e6a5dd85 231e591a 
        double(): 916876b2 e92c1cf9 cd4bbb0a 463cb2b3 
        CMAC(ad): 3c9b689a b41102e4 80954714 1dd0d15a 
             xor: adf31e28 5d3d1e1d 4ddefc1e 5bec63e9 
        double(): 5be63c50 ba7a3c3a 9bbdf83c b7d8c755 
        CMAC(ad): d98c9b0b e42cb2d7 aa98478e d11eda1b 
             xor: 826aa75b 5e568eed 3125bfb2 66c61d4e 
        double(): 04d54eb6 bcad1dda 624b7f64 cd8c3a1b 
        CMAC(ad): 128c62a1 ce3747a8 372c1c05 a538b96d 
             xor: 16592c17 729a5a72 55676361 68b48376 
   xorend part 1: 74686973 20697320 736f6d65 20706c61 
                  696e7465 78742074 6f20656e 637279
   xorend part 2: 662d0c62 01f33415 75342a37 45f5c625 
     CMAC(final): 7bdb6e3b 432667eb 06f4d14b ff2fbd0f 
      ciphertext: cb900f2f ddbe4043 26601965 c889bf17 
                  dba77ceb 094fa663 b7a3f748 ba8af829 
                  ea64ad54 4a272e9c 485b62a3 fd5c0d
         IV || C: 7bdb6e3b 432667eb 06f4d14b ff2fbd0f 
                  cb900f2f ddbe4043 26601965 c889bf17 
                  dba77ceb 094fa663 b7a3f748 ba8af829 
                  ea64ad54 4a272e9c 485b62a3 fd5c0d
Decryption:
      CMAC(zero): c8b43b59 74960e7c e6a5dd85 231e591a 
        double(): 916876b2 e92c1cf9 cd4bbb0a 463cb2b3 
        CMAC(ad): 3c9b689a b41102e4 80954714 1dd0d15a 
             xor: adf31e28 5d3d1e1d 4ddefc1e 5bec63e9 
        double(): 5be63c50 ba7a3c3a 9bbdf83c b7d8c755 
        CMAC(ad): d98c9b0b e42cb2d7 aa98478e d11eda1b 
             xor: 826aa75b 5e568eed 3125bfb2 66c61d4e 
        double(): 04d54eb6 bcad1dda 624b7f64 cd8c3a1b 
        CMAC(ad): 128c62a1 ce3747a8 372c1c05 a538b96d 
             xor: 16592c17 729a5a72 55676361 68b48376 
       plaintext: 74686973 20697320 736f6d65 20706c61 
                  696e7465 78742074 6f20656e 63727970 
                  74207573 696e6720 5349562d 414553
   xorend part 1: 74686973 20697320 736f6d65 20706c61 
                  696e7465 78742074 6f20656e 637279
   xorend part 2: 662d0c62 01f33415 75342a37 45f5c625 
     CMAC(final): 7bdb6e3b 432667eb 06f4d14b ff2fbd0f 
       plaintext: 74686973 20697320 736f6d65 20706c61 
                  696e7465 78742074 6f20656e 63727970 
                  74207573 696e6720 5349562d 414553
384-bit key test:
             key: fffefdfc fbfaf9f8 f7f6f5f4 f3f2f1f0 
                  f0f1f2f3 f4f5f6f7 f8f9fafb fcfdfeff 
                  fffefdfc fbfaf9f8 f7f6f5f4 f3f2f1f0 
              AD: 10111213 14151617 18191a1b 1c1d1e1f 
                  20212223 24252627 
       plaintext: 11223344 55667788 99aabbcc ddee
 exp. ciphertext: 89e869b9 32567851 54f09639 62fe0740 
                  eff356e4 2dec1f4f ebded366 42f2
Encryption:
      CMAC(zero): caa30589 56328045 f71d3683 121fd271 
        double(): 95460b12 ac65008b ee3a6d06 243fa465 
        CMAC(ad): 42db9c74 73f22d43 282d0bbd eda4346d 
             xor: d79d9766 df972dc8 c61766bb c99b9008 
             pad: 11223344 55667788 99aabbcc ddee8000 
             xor: be191d89 ea482c19 158476bb 4ed9a097 
     CMAC(final): 89e869b9 32567851 54f09639 62fe0740 
      ciphertext: eff356e4 2dec1f4f ebded366 42f2
         IV || C: 89e869b9 32567851 54f09639 62fe0740 
                  eff356e4 2dec1f4f ebded366 42f2
Decryption:
      CMAC(zero): caa30589 56328045 f71d3683 121fd271 
        double(): 95460b12 ac65008b ee3a6d06 243fa465 
        CMAC(ad): 42db9c74 73f22d43 282d0bbd eda4346d 
             xor: d79d9766 df972dc8 c61766bb c99b9008 
       plaintext: 11223344 55667788 99aabbcc ddee
             pad: 11223344 55667788 99aabbcc ddee8000 
             xor: be191d89 ea482c19 158476bb 4ed9a097 
     CMAC(final): 89e869b9 32567851 54f09639 62fe0740 
       plaintext: 11223344 55667788 99aabbcc ddee
512-bit key test:
             key: fffefdfc fbfaf9f8 f7f6f5f4 f3f2f1f0 
                  f0f1f2f3 f4f5f6f7 f8f9fafb fcfdfeff 
                  f0f1f2f3 f4f5f6f7 f8f9fafb fcfdfeff 
                  fffefdfc fbfaf9f8 f7f6f5f4 f3f2f1f0 
              AD: 10111213 14151617 18191a1b 1c1d1e1f 
                  20212223 24252627 
       plaintext: 11223344 55667788 99aabbcc ddee
 exp. ciphertext: 724dfb2e af94dbb1 9b0ba3a2 99a0801e 
                  f3b05a55 498ec255 2690b898 10e4
Encryption:
      CMAC(zero): 8eed9898 9c883019 85c48350 88b0592d 
        double(): 1ddb3131 39106033 0b8906a1 1160b2dd 
        CMAC(ad): bdb99556 dea3a38d f5f07bbe d1b62137 
             xor: a062a467 e7b3c3be fe797d1f c0d693ea 
             pad: 11223344 55667788 99aabbcc ddee8000 
             xor: 51e77b8b 9a01f0f5 655841f3 5c43a753 
     CMAC(final): 724dfb2e af94dbb1 9b0ba3a2 99a0801e 
      ciphertext: f3b05a55 498ec255 2690b898 10e4
         IV || C: 724dfb2e af94dbb1 9b0ba3a2 99a0801e 
                  f3b05a55 498ec255 2690b898 10e4
Decryption:
      CMAC(zero): 8eed9898 9c883019 85c48350 88b0592d 
        double(): 1ddb3131 39106033 0b8906a1 1160b2dd 
        CMAC(ad): bdb99556 dea3a38d f5f07bbe d1b62137 
             xor: a062a467 e7b3c3be fe797d1f c0d693ea 
       plaintext: 11223344 55667788 99aabbcc ddee
             pad: 11223344 55667788 99aabbcc ddee8000 
             xor: 51e77b8b 9a01f0f5 655841f3 5c43a753 
     CMAC(final): 724dfb2e af94dbb1 9b0ba3a2 99a0801e 
       plaintext: 11223344 55667788 99aabbcc ddee
Test high-level interface with non-NULL nonce:
             key: fffefdfc fbfaf9f8 f7f6f5f4 f3f2f1f0 
                  f0f1f2f3 f4f5f6f7 f8f9fafb fcfdfeff 
              AD: 10111213 14151617 18191a1b 1c1d1e1f 
                  20212223 24252627 
           nonce: 09f91102 9d74e35b d84156c5 635688c0 
       plaintext: 11223344 55667788 99aabbcc ddee
Encryption:
      CMAC(zero): 0e04dfaf c1efbf04 01405828 59bf073a 
        double(): 1c09bf5f 83df7e08 0280b050 b37e0e74 
        CMAC(ad): f1f922b7 f5193ce6 4ff80cb4 7d93f23b 
             xor: edf09de8 76c642ee 4d78bce4 ceedfc4f 
        double(): dbe13bd0 ed8c85dc 9af179c9 9ddbf819 
        CMAC(ad): 70d427c9 4b396a0e fcd1ce31 207db086 
             xor: ab351c19 a6b5efd2 6620b7f8 bda6489f 
             pad: 11223344 55667788 99aabbcc ddee8000 
             xor: 47480b77 180da82c 55ebd43d a6a211b9 
     CMAC(final): b477a36b 0d0f7898 7d985f38 87a7572d 
      ciphertext: 52352f0e d261459e 0de50f26 8260
         IV || C: b477a36b 0d0f7898 7d985f38 87a7572d 
                  52352f0e d261459e 0de50f26 8260
Decryption:
      CMAC(zero): 0e04dfaf c1efbf04 01405828 59bf073a 
        double(): 1c09bf5f 83df7e08 0280b050 b37e0e74 
        CMAC(ad): f1f922b7 f5193ce6 4ff80cb4 7d93f23b 
             xor: edf09de8 76c642ee 4d78bce4 ceedfc4f 
        double(): dbe13bd0 ed8c85dc 9af179c9 9ddbf819 
        CMAC(ad): 70d427c9 4b396a0e fcd1ce31 207db086 
             xor: ab351c19 a6b5efd2 6620b7f8 bda6489f 
       plaintext: 11223344 55667788 99aabbcc ddee
             pad: 11223344 55667788 99aabbcc ddee8000 
             xor: 47480b77 180da82c 55ebd43d a6a211b9 
     CMAC(final): b477a36b 0d0f7898 7d985f38 87a7572d 
       plaintext: 11223344 55667788 99aabbcc ddee
      CMAC(zero): 0e04dfaf c1efbf04 01405828 59bf073a 
        double(): 1c09bf5f 83df7e08 0280b050 b37e0e74 
        CMAC(ad): f1f922b7 f5193ce6 4ff80cb4 7d93f23b 
             xor: edf09de8 76c642ee 4d78bce4 ceedfc4f 
        double(): 1c09bf5f 83df7e08 0280b050 b37e0e74 
        CMAC(ad): f1f922b7 f5193ce6 4ff80cb4 7d93f23b 
             xor: edf09de8 76c642ee 4d78bce4 ceedfc4f 
             pad: 11223344 55667788 99aabbcc ddee8000 
             xor: cac30894 b8eaf254 035bc205 40357819 
     CMAC(final): 85632d07 c6e8f37f 950acd32 0a2ecc93 
      ciphertext: 40c02b96 90c4dc04 daef7f6a fe5c
             pad: 11223344 55667788 99aabbcc ddee8000 
             xor: cac30894 b8eaf254 035bc205 40357819 
     CMAC(final): 85632d07 c6e8f37f 950acd32 0a2ecc93 
      ciphertext: 40c02b96 90c4dc04 daef7f6a fe5c
             pad: 11223344 55667788 99aabbcc ddef8000 
             xor: cac30894 b8eaf254 035bc205 40347819 
     CMAC(final): bffdac5c b8fe7d97 3ea5da07 79b067a1 
      ciphertext: 7a677d15 f294eb27 035a9145 9244
Test bad key size: OK
Test decryption failure:
      CMAC(zero): 763cbcde 81df9131 bf897712 c088edad 
        double(): ec7979bd 03bf2263 7f12ee25 8111db5a 
        CMAC(ad): 763cbcde 81df9131 bf897712 c088edad 
             xor: 9a45c563 8260b352 c09b9937 419936f7 
       plaintext: 66e94bd4 ef8a2c3b 884cfa59 ca342b2e 
   xorend part 1: 
   xorend part 2: fcac8eb7 6dea9f69 48d7636e 8bad1dd9 
     CMAC(final): 9db0951a f98393d7 8766c419 4c706d68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant