public inbox for dm-crypt@saout.de
 help / color / mirror / Atom feed
* [dm-crypt] couple of questions related to using crypto map
@ 2020-06-29  0:13 Fourhundred Thecat
  2020-06-29 10:31 ` Arno Wagner
  0 siblings, 1 reply; 2+ messages in thread
From: Fourhundred Thecat @ 2020-06-29  0:13 UTC (permalink / raw)
  To: dm-crypt

Hello,

after some experiments, I came up with following 4 questions. I think
that the answer to all of them is yes, but I would like to confirm this
with the experts here:

1)
A crypto map aes-xts-plain64:sha512 with a random 512bit key is created
over a block device. When zeroes are written to the device through the
crypto map (encrypting), does it generate quality random data on the
block device (comparable to /dev/urandom)?

2)
The same crypto map over a block device, but the block devices contains
zeroes. When I read data, will it generate quality random data?
(comparable to /dev/urandom or a random number generator?)

3)
If yes should it be the fastest way to generate random data on a typical
Linux computer, compared to reading /dev/urandom? (especially when
having AES instruction support in the CPU)

4)
If the data obtained by reading from the zeroed device through that
crypto map (aes-xts-plain64:sha512) is written back to the block device
(using the same crypto map and key), will you get the original data? (in
this example zeros). Does the crypto map work in both directions?
Encrypting and decrypting when write and read back, and also when read
and write back?

could somebody please give me some feedback?

thanks,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-29 10:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-29  0:13 [dm-crypt] couple of questions related to using crypto map Fourhundred Thecat
2020-06-29 10:31 ` Arno Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox