Score:0

Use HMAC for every block encryption operation

kh flag

Is it possible to use HMAC while performing encryption of blocks?
I think that the main problem with the approach would be to get the same output size as the block, from the HMAC function.
Also, the hash function is one-way, so how would one perform the decryption?
Are there any real-world examples for this approach, or is it not feasible?

Ronnie1023 avatar
kh flag
@kelalaka Thanks for your comment. Also, isn't there a problem with the fact that the hash function is one way?
Ronnie1023 avatar
kh flag
I replace every encryption operation on a block, with HMAC function. But since the hash function is one-way, when I perform the decryption on every block, there is no inverse function, or am I wrong?
Ronnie1023 avatar
kh flag
Yes, that was my question. Can I encrypt every block with hash function? Is it not possible because of what I said about the one-way property of the hashing function?
kelalaka avatar
in flag
Does these answer your question? [Can I say "I have encrypted something" if I hash something?](https://crypto.stackexchange.com/questions/73179/can-i-say-i-have-encrypted-something-if-i-hash-something) and [Difference between encrypting something and hashing something](https://crypto.stackexchange.com/q/2887/18298)
kelalaka avatar
in flag
FYI, [CTR mode is designed for PRF](https://crypto.stackexchange.com/a/85572/18298) and we can use [Hash functions](https://crypto.stackexchange.com/q/1656/18298) to generate a keystream and encrypt like OTP manner.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.