diff --git a/rhizome_crypto.c b/rhizome_crypto.c index e446d3f0..476e8005 100644 --- a/rhizome_crypto.c +++ b/rhizome_crypto.c @@ -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); diff --git a/rhizome_store.c b/rhizome_store.c index e739a389..30275521 100644 --- a/rhizome_store.c +++ b/rhizome_store.c @@ -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,