소스 검색

reformatting

kyber
Henry Case 3 년 전
부모
커밋
115a3f5faa
1개의 변경된 파일16개의 추가작업 그리고 7개의 파일을 삭제
  1. +16
    -7
      src/capi/pqapi.c

+ 16
- 7
src/capi/pqapi.c 파일 보기

@@ -206,24 +206,33 @@ const params_t *pqc_sig_alg_by_id(uint8_t id) {
return 0;
}

bool pqc_keygen(const params_t *p, uint8_t *sk, uint8_t *pk) {
bool pqc_keygen(const params_t *p,
uint8_t *sk, uint8_t *pk) {
return !p->keygen(sk, pk);
}

bool pqc_kem_encapsulate(const params_t *p, uint8_t *ct, uint8_t *ss, const uint8_t *pk) {
bool pqc_kem_encapsulate(const params_t *p,
uint8_t *ct, uint8_t *ss,
const uint8_t *pk) {
return !((kem_params_t*)p)->encapsulate(ct, ss, pk);
}

bool pqc_kem_decapsulate(const params_t *p, uint8_t *ss, const uint8_t *ct, const uint8_t *sk) {
bool pqc_kem_decapsulate(const params_t *p,
uint8_t *ss, const uint8_t *ct,
const uint8_t *sk) {
return !((kem_params_t*)p)->decapsulate(ss, ct, sk);
}

bool pqc_sig_create(
const params_t *p, uint8_t *sig, uint64_t *siglen, const uint8_t *m, uint64_t mlen, const uint8_t *sk) {
bool pqc_sig_create(const params_t *p,
uint8_t *sig, uint64_t *siglen,
const uint8_t *m, uint64_t mlen,
const uint8_t *sk) {
return !((sig_params_t *)p)->sign(sig, siglen, m, mlen, sk);
}

bool pqc_sig_verify(
const params_t *p, const uint8_t *sig, uint64_t siglen, const uint8_t *m, uint64_t mlen, const uint8_t *pk) {
bool pqc_sig_verify(const params_t *p,
const uint8_t *sig, uint64_t siglen,
const uint8_t *m, uint64_t mlen,
const uint8_t *pk) {
return !((sig_params_t *)p)->verify(sig, siglen, m, mlen, pk);
}

불러오는 중...
취소
저장