meow_verify 37e50606; nyai f2938d28; svc_power e0494eb7; launcher 24c9ee5d(含热重载) 宿主验证12项全过(正例/篡负载/篡包名/无签系统包拒/第三方直装/降级拒/导出round-trip byte-identical/verify缺失宁缺勿装/footer容忍/E2E PERM/鉴权分类) 出入: TweetNaCl替orlp/ed25519(任务允许同等实现); 读级暂仍uid==0(用户随后定案放宽到任意调用者,待改); 系统身份allowlist为启发式
24 lines
1.2 KiB
C
24 lines
1.2 KiB
C
/* tweetnacl.h — TweetNaCl 用于 MeowOS .mpk 签名/验签的最小声明头(Ed25519 + SHA-512 子集)。
|
|
* 实现:https://tweetnacl.cr.yp.to/20140427/tweetnacl.c (公有领域)。
|
|
* 仅暴露 meow_verify / meow_sign 需要的一小片 API;其余(salsa20/box/secretbox…)
|
|
* 在 tweetnacl.c 内保留但未声明,未引用即不进入最终链接。 */
|
|
#ifndef TWEETNACL_H
|
|
#define TWEETNACL_H
|
|
|
|
#define crypto_sign_BYTES 64
|
|
#define crypto_sign_PUBLICKEYBYTES 32
|
|
#define crypto_sign_SECRETKEYBYTES 64
|
|
#define crypto_hash_BYTES 64
|
|
|
|
int crypto_verify_16(const unsigned char *x, const unsigned char *y);
|
|
int crypto_verify_32(const unsigned char *x, const unsigned char *y);
|
|
int crypto_hash(unsigned char *out, const unsigned char *m, unsigned long long n);
|
|
|
|
int crypto_sign_keypair(unsigned char *public_key, unsigned char *secret_key);
|
|
int crypto_sign(unsigned char *sm, unsigned long long *smlen,
|
|
const unsigned char *m, unsigned long long n, const unsigned char *sk);
|
|
int crypto_sign_open(unsigned char *m, unsigned long long *mlen,
|
|
const unsigned char *sm, unsigned long long n, const unsigned char *pk);
|
|
|
|
#endif /* TWEETNACL_H */
|