mkdir build
cd build
cmake ../
make
doxygen Doxyfile
firefox docs/html/index.html &
./sm9test // 生成配置文件
./servertest // 运行server
./client // 运行client
运行结果:Server 获取到 Client 的ID 和 AES 密钥
decrypted text : Client
decrypted text length : 52
./sstest // test the secret sharing functions
- 协议完善
IBE通信- 服务器收到用户ID 和 AES 密钥后,生成相应的私钥,用AES加密 (IV由服务器选择,将IV和加密后的私钥按照协议格式发送给客户端)
- 客户端收到AES加密的密钥,解密后获取私钥保存到本地
- 某一实体向另一实体发起密钥协商请求,请求附带内容为本方的$MPK_A$
- 实体收到密钥协商请求后返回密钥协商ACK,附带内容为本方的$MPK_B$和$Enc_{MPK_A, ID_A}(key_B)$
- 实体收到协商ACK后返回ACK_2,附带内容为$Enc_{MPK_B, ID_B}(key_A)$ (要不要再加一轮ACK待后续修改)
- 会话密钥协商结束后用$(key_A||key_B)$为AES密钥的通信设计
- 秘密共享
generate a random polynomialget the value of f(x) given the xget the value of the lagrange polynomial$l_i(x)$ given the xpoint additionscalar multiplication
- 签名和认证
int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
const EC_POINT *b, BN_CTX *ctx);
int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
size_t num, const EC_POINT *p[], const BIGNUM *m[],
BN_CTX *ctx);