Skip to content

Commit 65d8c94

Browse files
authored
Expose AES_cfb1_encrypt and AES_cfb8_encrypt (#1967)
Moved the `AES_cfb1_encrypt` and `AES_cfb8_encrypt` to the `openssl/aes.h` header to be exposed similarly too `AES_cfb128_encrypt`. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
1 parent 0cfd3ed commit 65d8c94

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

crypto/fipsmodule/cipher/internal.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,6 @@ ctr128_f aes_ctr_set_key(AES_KEY *aes_key, GCM128_KEY *gcm_key,
201201
block128_f *out_block, const uint8_t *key,
202202
size_t key_bytes);
203203

204-
// AES_cfb1_encrypt calls |CRYPTO_cfb128_1_encrypt| using the block
205-
// |AES_encrypt|.
206-
void AES_cfb1_encrypt(const uint8_t *in, uint8_t *out, size_t bits,
207-
const AES_KEY *key, uint8_t *ivec, int *num, int enc);
208-
209-
// AES_cfb8_encrypt calls |CRYPTO_cfb128_8_encrypt| using the block
210-
// |AES_encrypt|.
211-
void AES_cfb8_encrypt(const uint8_t *in, uint8_t *out, size_t len,
212-
const AES_KEY *key, uint8_t *ivec, int *num, int enc);
213204

214205
// EXPERIMENTAL functions for use in the TLS Transfer function. See
215206
// |SSL_to_bytes| for more details.

include/openssl/aes.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,24 @@ OPENSSL_EXPORT void AES_ofb128_encrypt(const uint8_t *in, uint8_t *out,
141141
size_t len, const AES_KEY *key,
142142
uint8_t *ivec, int *num);
143143

144+
// AES_cfb1_encrypt encrypts (or decrypts, if |enc| == |AES_DECRYPT|) |len|
145+
// bytes from |in| to |out|. The |num| parameter must be set to zero on the
146+
// first call. This function may be called in-place with |in| equal to |out|,
147+
// but otherwise the buffers may not partially overlap. A partial overlap may
148+
// overwrite input data before it is read.
149+
OPENSSL_EXPORT void AES_cfb1_encrypt(const uint8_t *in, uint8_t *out,
150+
size_t bits, const AES_KEY *key,
151+
uint8_t *ivec, int *num, int enc);
152+
153+
// AES_cfb8_encrypt encrypts (or decrypts, if |enc| == |AES_DECRYPT|) |len|
154+
// bytes from |in| to |out|. The |num| parameter must be set to zero on the
155+
// first call. This function may be called in-place with |in| equal to |out|,
156+
// but otherwise the buffers may not partially overlap. A partial overlap may
157+
// overwrite input data before it is read.
158+
OPENSSL_EXPORT void AES_cfb8_encrypt(const uint8_t *in, uint8_t *out,
159+
size_t len, const AES_KEY *key,
160+
uint8_t *ivec, int *num, int enc);
161+
144162
// AES_cfb128_encrypt encrypts (or decrypts, if |enc| == |AES_DECRYPT|) |len|
145163
// bytes from |in| to |out|. The |num| parameter must be set to zero on the
146164
// first call. This function may be called in-place with |in| equal to |out|,

0 commit comments

Comments
 (0)