mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-09 07:23:56 +08:00
SM2 KAP (Key Agreement Protocol), not tested
This commit is contained in:
@@ -49,26 +49,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <openssl/sms4.h>
|
||||
#include <openssl/modes.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "sms4.h"
|
||||
|
||||
#ifndef MODES_DEBUG
|
||||
# ifndef NDEBUG
|
||||
# define NDEBUG
|
||||
# endif
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
void sms4_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const sms4_key_t *key,
|
||||
unsigned char ivec[SMS4_BLOCK_SIZE],
|
||||
int *num)
|
||||
size_t len, const sms4_key_t *key, unsigned char *iv, int *num)
|
||||
{
|
||||
CRYPTO_ofb128_encrypt(in,out,length,key,ivec,num,(block128_f)sms4_encrypt);
|
||||
CRYPTO_ofb128_encrypt(in, out, len, key, iv, num, (block128_f)sms4_encrypt);
|
||||
}
|
||||
//cprefix##_ofb##cbits##_encrypt
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user