mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-24 07:40:26 +01:00
exosphere: correct reencryption of rsa private keys
This commit is contained in:
parent
524da78b0e
commit
7bc0250cea
@ -205,10 +205,12 @@ void gcm_encrypt_key(void *dst, size_t dst_size, const void *src, size_t src_siz
|
||||
se_generate_random(KEYSLOT_SWITCH_RNGKEY, intermediate_buf, 0x10);
|
||||
flush_dcache_range(intermediate_buf, intermediate_buf + 0x10);
|
||||
|
||||
/* Copy in the src. */
|
||||
memcpy(intermediate_buf + 0x10, src, src_size);
|
||||
|
||||
/* Write Device ID. */
|
||||
write64be(intermediate_buf, src_size + 0x18, fuse_get_device_id() | (deviceid_high << 56));
|
||||
|
||||
|
||||
/* J = GHASH(CTR); */
|
||||
uint8_t j_block[0x10];
|
||||
ghash(j_block, intermediate_buf, 0x10, NULL, false);
|
||||
|
Loading…
Reference in New Issue
Block a user