• Gilad Ben-Yossef's avatar
    crypto: ccree - use CBC-CS3 CTS mode · 84f366da
    Gilad Ben-Yossef authored
    The ccree driver implemented NIST 800-38A CBC-CS2 ciphertext format,
    which only reverses the last two blocks if the stolen ciphertext amount
    are none zero. Move it to the kernel chosen format of CBC-CS3  which swaps
    the final blocks unconditionally and rename it to "cts" now that it
    complies with the kernel format and passes the self tests.
    
    Ironically, the CryptoCell REE HW does just that, so the fix is dropping
    the code that forced it to use plain CBC if the ciphertext was block
    aligned.
    Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    84f366da
cc_cipher.c 39.6 KB