I am trying to use the 1-bit stream cipher mode in OpenSSL, specifically EVP_aes_128_cfb1. I initialize the context with that parameter using, EVP_EncryptInit_ex(). The rest is unclear to me. I am expecting this to work as a bit-by-bit stream cipher, meaning that if I "feed" it with a stream of bits it will gradually "build" the ciphertext bit by bit, and that ciphertext should eventually be identical to a one-shot encryption of the entire thing when using a bigger bit width like 128 bits.
Whatever I try, this is not what I am getting, and to be honest I am not sure if the problem is in the expectation or in my usage of OpenSSL. I am using EVP_EncryptUpdate(&ctx, p_target, &outlen, ¤t_byte, 1) but that means calling this 8 times with the same input byte, shifted properly. Then I expect the target byte, which also stays the same for 8 iteration at a time, to gradually be built one bit index at a time from MSB to LSB, with the context object orchestrating the state.
This does no yield the expected results, and I could not find working examples.
Help will be appreciated. Thanks.