mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 03:50:57 +01:00
turned crypto_secretbox nonces into counters, thereby implementing counter mode (CTR mode). we use variable size counters, max counter size is 184 bit, max implemented currently are 64 bit, multiply by 32kb and you get the maximum file size supported by pcp encryption
This commit is contained in:
@@ -333,6 +333,11 @@ int pcp_sodium_verify_mac(byte **cleartext,
|
||||
pcp_rec_t *pcp_rec_new(byte *cipher, size_t clen, pcp_key_t *secret, pcp_pubkey_t *pub);
|
||||
void pcp_rec_free(pcp_rec_t *r);
|
||||
|
||||
/* CTR mode helpers */
|
||||
byte *_gen_ctr_nonce(uint64_t ctr);
|
||||
uint64_t _get_nonce_ctr(byte *nonce);
|
||||
|
||||
|
||||
#endif /* _HAVE_PCP_CRYPTO_H */
|
||||
|
||||
/**@}*/
|
||||
|
||||
@@ -377,8 +377,4 @@ struct _pcp_ks_bundle_t {
|
||||
};
|
||||
typedef struct _pcp_ks_bundle_t pcp_ks_bundle_t;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif //_HAVE_PCP_STRUCTS_H
|
||||
|
||||
Reference in New Issue
Block a user