Skip to main content
added 15 characters in body
Source Link
LightBit
  • 1.7k
  • 13
  • 27

Am I understanding things correctly?

SIV requires MAC, not just hash. Keyed hash can be used as MAC. However, you do not have a keyed hash in your example (but you do say keyed hash).

Is it safe to use the same key for both keyed hash and encryption?

DifferentGenerally different key should be used for MAC and encryption. Although in some cases it may be fine with same key, if MAC and encryption are different enough. For example, if you use CBC-MAC and CTR both with AES, using same key is bad. SIV mode defines how you derive the keys from master key.

I assume actual siv usage is a bit more than just hashing the input?

Well, again you have to use MAC. You should check actual SIV variant for more details. For example SIV with AES (CMAC and CTR): https://datatracker.ietf.org/doc/html/rfc5297

Am I understanding things correctly?

SIV requires MAC, not just hash. Keyed hash can be used as MAC. However, you do not have a keyed hash in your example (but you do say keyed hash).

Is it safe to use the same key for both keyed hash and encryption?

Different key should be used for MAC and encryption. Although in some cases it may be fine with same key, if MAC and encryption are different enough. For example, if you use CBC-MAC and CTR both with AES, using same key is bad. SIV defines how you derive the keys from master key.

I assume actual siv usage is a bit more than just hashing the input?

Well, again you have to use MAC. You should check actual SIV variant for more details. For example SIV with AES (CMAC and CTR): https://datatracker.ietf.org/doc/html/rfc5297

Am I understanding things correctly?

SIV requires MAC, not just hash. Keyed hash can be used as MAC. However, you do not have a keyed hash in your example (but you do say keyed hash).

Is it safe to use the same key for both keyed hash and encryption?

Generally different key should be used for MAC and encryption. Although in some cases it may be fine with same key, if MAC and encryption are different enough. For example, if you use CBC-MAC and CTR both with AES, using same key is bad. SIV mode defines how you derive the keys from master key.

I assume actual siv usage is a bit more than just hashing the input?

Well, again you have to use MAC. You should check actual SIV variant for more details. For example SIV with AES (CMAC and CTR): https://datatracker.ietf.org/doc/html/rfc5297

added 166 characters in body
Source Link
LightBit
  • 1.7k
  • 13
  • 27

Am I understanding things correctly?

SIV requires MAC, not just hash. Keyed hash can be used as MAC. However, you do not have a keyed hash in your example (but you do say keyed hash).

Is it safe to use the same key for both keyed hash and encryption?

Normally differentDifferent key should be used for MAC and encryption. Although in some cases it may be fine with same key, if MAC and encryption are different enough. For example, if you use CBC-MAC and CTR both with AES, using same key is bad. SIV defines how you derive the keys from master key.

I assume actual siv usage is a bit more than just hashing the input?

Well, again you have to use MAC. You should check actual SIV variant for more details. For example SIV with AES (CMAC and CTR): https://datatracker.ietf.org/doc/html/rfc5297

Am I understanding things correctly?

SIV requires MAC not hash. Keyed hash can be used as MAC. However, you do not have a keyed hash in your example.

Is it safe to use the same key for both keyed hash and encryption?

Normally different key should be used for MAC and encryption. Although in some cases it may be fine with same key, if MAC and encryption are different enough. For example, if you use CBC-MAC and CTR both with AES, using same key is bad. SIV defines how you derive the keys from master key.

I assume actual siv usage is a bit more than just hashing the input?

Well, again you have to use MAC.

Am I understanding things correctly?

SIV requires MAC, not just hash. Keyed hash can be used as MAC. However, you do not have a keyed hash in your example (but you do say keyed hash).

Is it safe to use the same key for both keyed hash and encryption?

Different key should be used for MAC and encryption. Although in some cases it may be fine with same key, if MAC and encryption are different enough. For example, if you use CBC-MAC and CTR both with AES, using same key is bad. SIV defines how you derive the keys from master key.

I assume actual siv usage is a bit more than just hashing the input?

Well, again you have to use MAC. You should check actual SIV variant for more details. For example SIV with AES (CMAC and CTR): https://datatracker.ietf.org/doc/html/rfc5297

Source Link
LightBit
  • 1.7k
  • 13
  • 27

Am I understanding things correctly?

SIV requires MAC not hash. Keyed hash can be used as MAC. However, you do not have a keyed hash in your example.

Is it safe to use the same key for both keyed hash and encryption?

Normally different key should be used for MAC and encryption. Although in some cases it may be fine with same key, if MAC and encryption are different enough. For example, if you use CBC-MAC and CTR both with AES, using same key is bad. SIV defines how you derive the keys from master key.

I assume actual siv usage is a bit more than just hashing the input?

Well, again you have to use MAC.