Estoy ejecutando vectores de prueba FIPS contra AES-CFB. Estoy obteniendo resultados correctos para aes-cfb128 y aes-cfb8 pero obteniendo resultados incorrectos para aes-cfb1. Los valores que estoy usando para las pruebas aes-cfb1 son:
KEY = 10a58869d74be5a374cf867cfb473859
IV = 00000000000000000000000000000000
PLAINTEXT = 0 <===== Input text
CIPHERTEXT = 0
No obtengo ningún valor para el cifrado o texto sin formato mientras lo codifico y decodifico usando aes-cfb1. ¿Se debe a que el valor de entrada se lee como hexadecimal? ¿Hay alguna forma de convertir el texto sin formato de entrada "0" en un valor binario en el shell de Linux ash?
===========================
Correct Results for CFB128
===========================
KEY = 10a58869d74be5a374cf867cfb473859
IV = 00000000000000000000000000000000
PLAINTEXT = 00000000000000000000000000000000
CIPHERTEXT = 6d251e6944b051e04eaa6fb4dbf78465
[root@Controller]# echo 00000000000000000000000000000000 | xxd -r -p > plaintext
[root@Controller]#
[root@Controller]# openssl enc -aes-128-cfb -p -nopad -nosalt -K 10a58869d74be5a374cf867cfb473859 -iv 00000000000000000000000000000000 -in plaintext -out ciphertext
key=10A58869D74BE5A374CF867CFB473859
iv =00000000000000000000000000000000
[root@Controller]# xxd -p ciphertext > ciphertextssd
[root@Controller]# cat ciphertextssd
6d251e6944b051e04eaa6fb4dbf78465 <============================================= Correct Result
[root@Controller]#
============================
In-Correct Results for CFB1
============================
KEY = a2e2fa9baf7d20822ca9f0542f764a41
IV = 00000000000000000000000000000000
PLAINTEXT = 0
CIPHERTEXT = 1
[root@Controller]# echo 0 | xxd -r -p > plaintext
[root@Controller]#
[root@Controller]# openssl enc -aes-128-cfb1 -p -nopad -nosalt
-K a2e2fa9baf7d20822ca9f0542f764a41 -iv 00000000000000000000000000000000 -in pla
intext -out ciphertext
key=A2E2FA9BAF7D20822CA9F0542F764A41
iv =00000000000000000000000000000000
[root@Controller]# xxd -p ciphertext > ciphertextssd
[root@Controller]#
[root@Controllerh]# cat ciphertextssd
[root@Controller]# <=================================== No Result whereas it should be 1