Add stubs for ccchacha20 and cch2c

This commit is contained in:
Thomas A 2022-11-20 18:16:41 -08:00
parent 26c3cca525
commit da1ff08519
5 changed files with 12 additions and 15 deletions

View File

@ -4,9 +4,9 @@
#include <stddef.h>
#include <stdint.h>
extern size_t CCCHACHA20_KEY_NBYTES;
extern size_t CCCHACHA20_NONCE_NBYTES;
extern size_t CCPOLY1305_TAG_NBYTES;
#define CCCHACHA20_KEY_NBYTES 0
#define CCCHACHA20_NONCE_NBYTES 0
#define CCPOLY1305_TAG_NBYTES 0
void *ccchacha20poly1305_info();
int ccchacha20(const void *key, const void *nonce, uint32_t counter, size_t dataInLength, const void *dataIn, void *dataOut);

View File

@ -8,9 +8,9 @@ struct cch2c_info {
int dummy;
};
extern struct cch2c_info *cch2c_p256_sha256_sswu_ro_info;
extern struct cch2c_info *cch2c_p384_sha512_sswu_ro_info;
extern struct cch2c_info *cch2c_p521_sha512_sswu_ro_info;
extern const struct cch2c_info cch2c_p256_sha256_sswu_ro_info;
extern const struct cch2c_info cch2c_p384_sha512_sswu_ro_info;
extern const struct cch2c_info cch2c_p521_sha512_sswu_ro_info;
int cch2c(const struct cch2c_info *h2c_info, size_t dst_nbytes, const void *dst, size_t data_nbytes, const void *data, ccec_pub_ctx_t public);

View File

@ -584,6 +584,9 @@ _cczp_power
#_csss_shamir_share_bag_can_recover_secret
#_fipspost_post
#_fipspost_trace_vtable
_cch2c_p256_sha256_sswu_ro_info
_cch2c_p384_sha512_sswu_ro_info
_cch2c_p521_sha512_sswu_ro_info
# not in standard corecrypto, for some reason?
_ccn_shift_left

View File

@ -2,10 +2,6 @@
#include <stdio.h>
#include <stdlib.h>
size_t CCCHACHA20_KEY_NBYTES = 0;
size_t CCCHACHA20_NONCE_NBYTES = 0;
size_t CCPOLY1305_TAG_NBYTES = 0;
int ccchacha20(const void *key, const void *nonce, uint32_t counter, size_t dataInLength, const void *dataIn, void *dataOut) {
printf("DARLING CRYPTO STUB: %s\n", __PRETTY_FUNCTION__);
return -1;

View File

@ -2,11 +2,9 @@
#include <stdio.h>
// #include <stdlib.h>
struct cch2c_info cch2c_info_stub = {0};
struct cch2c_info *cch2c_p256_sha256_sswu_ro_info = &cch2c_info_stub;
struct cch2c_info *cch2c_p384_sha512_sswu_ro_info = &cch2c_info_stub;
struct cch2c_info *cch2c_p521_sha512_sswu_ro_info = &cch2c_info_stub;
const struct cch2c_info cch2c_p256_sha256_sswu_ro_info = {0};
const struct cch2c_info cch2c_p384_sha512_sswu_ro_info = {0};
const struct cch2c_info cch2c_p521_sha512_sswu_ro_info = {0};
int cch2c(const struct cch2c_info *h2c_info, size_t dst_nbytes, const void *dst, size_t data_nbytes, const void *data, ccec_pub_ctx_t public) {
printf("DARLING CRYPTO STUB: %s\n", __PRETTY_FUNCTION__);