mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-08 11:34:13 +00:00
Fix rhizome key generation for meshms
This commit is contained in:
parent
04955f1ddd
commit
1a543484bd
@ -639,7 +639,6 @@ int rhizome_derive_payload_key(rhizome_manifest *m)
|
||||
DEBUGF("derived payload key from bundle secret bsk=%s", alloca_tohex(m->cryptoSignSecret, sizeof m->cryptoSignSecret));
|
||||
unsigned char raw_key[9+crypto_sign_edwards25519sha512batch_SECRETKEYBYTES]="sasquatch";
|
||||
bcopy(m->cryptoSignSecret, &raw_key[9], crypto_sign_edwards25519sha512batch_SECRETKEYBYTES);
|
||||
unsigned char hash[crypto_hash_sha512_BYTES];
|
||||
crypto_hash_sha512(hash, raw_key, sizeof(raw_key));
|
||||
}
|
||||
bcopy(hash, m->payloadKey, RHIZOME_CRYPT_KEY_BYTES);
|
||||
|
@ -892,7 +892,8 @@ ssize_t rhizome_read(struct rhizome_read *read_state, unsigned char *buffer, siz
|
||||
}
|
||||
|
||||
if (read_state->crypt && buffer && bytes_read>0){
|
||||
dump("before decrypt", buffer, bytes_read);
|
||||
if (config.debug.rhizome)
|
||||
dump("before decrypt", buffer, bytes_read);
|
||||
if(rhizome_crypt_xor_block(
|
||||
buffer, bytes_read,
|
||||
read_state->offset + read_state->tail,
|
||||
|
Loading…
x
Reference in New Issue
Block a user