mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-11 16:33:40 +08:00
add zeromem engine
anti memory leakage attack
This commit is contained in:
36
engines/zeromem/ec2m_kern.h
Executable file
36
engines/zeromem/ec2m_kern.h
Executable file
@@ -0,0 +1,36 @@
|
||||
#ifndef _EC2M_KERN_H_
|
||||
#define _EC2M_KERN_H_
|
||||
|
||||
#define NETLINK_ECC 31
|
||||
#define MAX_PAYLOAD 1024
|
||||
|
||||
#define REQ_IMPORT_KEY 1
|
||||
#define REQ_PRIVATE_OP 2
|
||||
|
||||
#define OK 0
|
||||
#define FAIL -1
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include "ec.h"
|
||||
|
||||
struct ec2m_request_st {
|
||||
int func;
|
||||
int len;
|
||||
};
|
||||
|
||||
struct ec2m_response_st
|
||||
{
|
||||
int result;
|
||||
};
|
||||
|
||||
extern int ec2m_kern_init(void);
|
||||
extern void ec2m_kern_clean(void);
|
||||
|
||||
extern int ec2m_import_key(mm_256 *key);
|
||||
extern int ec2m_private_operation(mm256_point_t*p, mm256_point_t*q);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user