Can I hash a secret key and used the hash as key ID?
Clash Royale CLAN TAG#URR8PPP
up vote
8
down vote
favorite
I am using AES-CBC to provide confidentiality for protocol messages. I want to allow the receiver to know the secret key by using a key ID. For this I hash the secret key to generate a key ID. Every time the sender wants to send a message, the sender appends the key ID to the message to allow the receiver to bind the key ID with a secret key.
Is hashing the secret key to generate a key ID a secure mechanism?
hash aes
add a comment |Â
up vote
8
down vote
favorite
I am using AES-CBC to provide confidentiality for protocol messages. I want to allow the receiver to know the secret key by using a key ID. For this I hash the secret key to generate a key ID. Every time the sender wants to send a message, the sender appends the key ID to the message to allow the receiver to bind the key ID with a secret key.
Is hashing the secret key to generate a key ID a secure mechanism?
hash aes
So you're essentially looking for an AES equivalent of an RSA public key fingerprint?
â Mike Ounsworth
Aug 31 at 1:35
2
Beware that an attacker may change the key ID and indicate a different, possibly less secure key. If you leave an insecure test key or similar you may be in trouble. If you use CBC (especially without additional protection from HMAC) I would seriously question the security of your protocol, up to and including the confidentiality of the messages.
â Maarten Bodewes
Aug 31 at 1:54
The chat app Telegram has a symmetric 256 byte key (authkey) between client and server and it uses 8 bytes of its SHA-1 hash as a key identifier.
â Henno Brandsma
Aug 31 at 22:17
add a comment |Â
up vote
8
down vote
favorite
up vote
8
down vote
favorite
I am using AES-CBC to provide confidentiality for protocol messages. I want to allow the receiver to know the secret key by using a key ID. For this I hash the secret key to generate a key ID. Every time the sender wants to send a message, the sender appends the key ID to the message to allow the receiver to bind the key ID with a secret key.
Is hashing the secret key to generate a key ID a secure mechanism?
hash aes
I am using AES-CBC to provide confidentiality for protocol messages. I want to allow the receiver to know the secret key by using a key ID. For this I hash the secret key to generate a key ID. Every time the sender wants to send a message, the sender appends the key ID to the message to allow the receiver to bind the key ID with a secret key.
Is hashing the secret key to generate a key ID a secure mechanism?
hash aes
hash aes
edited Aug 31 at 1:53
Maarten Bodewes
47.8k567178
47.8k567178
asked Aug 31 at 1:10
Aymn Alaney
2218
2218
So you're essentially looking for an AES equivalent of an RSA public key fingerprint?
â Mike Ounsworth
Aug 31 at 1:35
2
Beware that an attacker may change the key ID and indicate a different, possibly less secure key. If you leave an insecure test key or similar you may be in trouble. If you use CBC (especially without additional protection from HMAC) I would seriously question the security of your protocol, up to and including the confidentiality of the messages.
â Maarten Bodewes
Aug 31 at 1:54
The chat app Telegram has a symmetric 256 byte key (authkey) between client and server and it uses 8 bytes of its SHA-1 hash as a key identifier.
â Henno Brandsma
Aug 31 at 22:17
add a comment |Â
So you're essentially looking for an AES equivalent of an RSA public key fingerprint?
â Mike Ounsworth
Aug 31 at 1:35
2
Beware that an attacker may change the key ID and indicate a different, possibly less secure key. If you leave an insecure test key or similar you may be in trouble. If you use CBC (especially without additional protection from HMAC) I would seriously question the security of your protocol, up to and including the confidentiality of the messages.
â Maarten Bodewes
Aug 31 at 1:54
The chat app Telegram has a symmetric 256 byte key (authkey) between client and server and it uses 8 bytes of its SHA-1 hash as a key identifier.
â Henno Brandsma
Aug 31 at 22:17
So you're essentially looking for an AES equivalent of an RSA public key fingerprint?
â Mike Ounsworth
Aug 31 at 1:35
So you're essentially looking for an AES equivalent of an RSA public key fingerprint?
â Mike Ounsworth
Aug 31 at 1:35
2
2
Beware that an attacker may change the key ID and indicate a different, possibly less secure key. If you leave an insecure test key or similar you may be in trouble. If you use CBC (especially without additional protection from HMAC) I would seriously question the security of your protocol, up to and including the confidentiality of the messages.
â Maarten Bodewes
Aug 31 at 1:54
Beware that an attacker may change the key ID and indicate a different, possibly less secure key. If you leave an insecure test key or similar you may be in trouble. If you use CBC (especially without additional protection from HMAC) I would seriously question the security of your protocol, up to and including the confidentiality of the messages.
â Maarten Bodewes
Aug 31 at 1:54
The chat app Telegram has a symmetric 256 byte key (authkey) between client and server and it uses 8 bytes of its SHA-1 hash as a key identifier.
â Henno Brandsma
Aug 31 at 22:17
The chat app Telegram has a symmetric 256 byte key (authkey) between client and server and it uses 8 bytes of its SHA-1 hash as a key identifier.
â Henno Brandsma
Aug 31 at 22:17
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
5
down vote
accepted
In the standard model of hash functions there isn't a requirement that hash outputs not have properties that leak information about the input.
In the random oracle model of hash functions there isn't a relationship between input and output other than the input/output mapping you get from querying the oracle. The model says that for each input the corresponding output is assigned a value chosen randomly from a uniform distribution of all possible output values.
If a hash function behaves like a random oracle then the only way to learn about an input with just the output known to you is to try hashing inputs and look for matching results. (This is how password cracking works against defenders who use salts properly.)
How secure it would be to publish such a hash output depends on how unpredictable the input is. For low entropy (highly predictable) inputs, the number of hashes you need to compute in this guess-and-check method is small (or likely to be small). For high entropy inputs the number of evaluations is large.
If your input can be one of $2^128$ possible values and each possible value is equally probable, then the expected (or maximum) number of hashes that need to be tested is about $2^127$ (or $2^128$).
Your AES key is supposed to be unpredictable and come from a uniform distribution of all $2^128$ possible keys (or more for larger key sizes). Therefore if you publish only the hash of an AES key, people won't be able to learn anything about the key without on the order of $2^127$ brute-force-effort. The same amount of work it would take to guess an AES key by brute force attack.
People treat cryptographic hashes (like the SHA and Blake2 algorithms) like a random oracle in practice. (Information can still be leaked through side-channels of implementations, of course.) So publishing the SHA-2 hash of a secret key doesn't compromise security on it's own. Not anymore than publishing the cryptographic hash of any kind of secret with at least 128-bit entropy.
HOWEVER that doesn't mean your specific protocol or application won't use the hash of a secret key securely. As @RichieFrame said some other part of some software could be using the hash of the key differently, so it's risky. And as @MaartenBodewes says the key ID mechanism could be a security risk itself.
You also must not use a non-cryptographic hash.
I suggest you use a separate randomly generated key-ID instead of something derived from the key, if possible, to avoid potential errors.
IDs don't need to be randomly generated. Sequentially is fine if you are working in an entropy-constrained environment (but you do then have to worry about duplicate IDs if the source is restarted).
â Martin Bonner
Aug 31 at 11:56
add a comment |Â
up vote
10
down vote
I would do it a little differently so there is less of a relationship between the ID and the key
Encrypt a block of all 0s with the key; $X$ = $E_k(0_128)$
Hash X; $H$ = SHA256$(X)$
Truncate the hash to 32 bits (8 hex characters)
Encrypting a block of 0s and truncating is generally how a key check value is generated, as block ciphers are designed to resist key recovery, the intermediate hash step is there for extra security, so you are not exposing a known ciphertext value.
I would not consider a direct key hash safe, some software may use that internally, and you do not want that exposed
What do you mean by 0s?
â Aymn Alaney
Aug 31 at 1:32
@AymnAlaney 0 bits, AES has a 128-bit block size, so all of them 0 and not 1
â Richie Frame
Aug 31 at 1:47
2
If software was to use a hash over a secret key internally other than to identify the key I would consider the software broken. But I like the idea to add an additional hash over the regular KCV, which has broad support but may indeed be insecure...
â Maarten Bodewes
Aug 31 at 1:50
add a comment |Â
up vote
-3
down vote
Hashing does not provide confidentiality, and theoretically your scheme is broken.
PS: This is exact and correct answer to the OP question, and I will not delete it.
Please downvote to show your cryptographic illiteracy.
1
1) Maybe remove the outright anger from your answer? 2) Maybe add some more context? I suspect the downvotes are because a one-sentence answer (correct or otherwise) is not explaining anything.
â Mike Ounsworth
Aug 31 at 10:53
1
I have edited your answer to remove what Mike callled "the anger". Please do not insult your readers, this is never well-received.
â SEJPMâ¦
Aug 31 at 11:59
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
In the standard model of hash functions there isn't a requirement that hash outputs not have properties that leak information about the input.
In the random oracle model of hash functions there isn't a relationship between input and output other than the input/output mapping you get from querying the oracle. The model says that for each input the corresponding output is assigned a value chosen randomly from a uniform distribution of all possible output values.
If a hash function behaves like a random oracle then the only way to learn about an input with just the output known to you is to try hashing inputs and look for matching results. (This is how password cracking works against defenders who use salts properly.)
How secure it would be to publish such a hash output depends on how unpredictable the input is. For low entropy (highly predictable) inputs, the number of hashes you need to compute in this guess-and-check method is small (or likely to be small). For high entropy inputs the number of evaluations is large.
If your input can be one of $2^128$ possible values and each possible value is equally probable, then the expected (or maximum) number of hashes that need to be tested is about $2^127$ (or $2^128$).
Your AES key is supposed to be unpredictable and come from a uniform distribution of all $2^128$ possible keys (or more for larger key sizes). Therefore if you publish only the hash of an AES key, people won't be able to learn anything about the key without on the order of $2^127$ brute-force-effort. The same amount of work it would take to guess an AES key by brute force attack.
People treat cryptographic hashes (like the SHA and Blake2 algorithms) like a random oracle in practice. (Information can still be leaked through side-channels of implementations, of course.) So publishing the SHA-2 hash of a secret key doesn't compromise security on it's own. Not anymore than publishing the cryptographic hash of any kind of secret with at least 128-bit entropy.
HOWEVER that doesn't mean your specific protocol or application won't use the hash of a secret key securely. As @RichieFrame said some other part of some software could be using the hash of the key differently, so it's risky. And as @MaartenBodewes says the key ID mechanism could be a security risk itself.
You also must not use a non-cryptographic hash.
I suggest you use a separate randomly generated key-ID instead of something derived from the key, if possible, to avoid potential errors.
IDs don't need to be randomly generated. Sequentially is fine if you are working in an entropy-constrained environment (but you do then have to worry about duplicate IDs if the source is restarted).
â Martin Bonner
Aug 31 at 11:56
add a comment |Â
up vote
5
down vote
accepted
In the standard model of hash functions there isn't a requirement that hash outputs not have properties that leak information about the input.
In the random oracle model of hash functions there isn't a relationship between input and output other than the input/output mapping you get from querying the oracle. The model says that for each input the corresponding output is assigned a value chosen randomly from a uniform distribution of all possible output values.
If a hash function behaves like a random oracle then the only way to learn about an input with just the output known to you is to try hashing inputs and look for matching results. (This is how password cracking works against defenders who use salts properly.)
How secure it would be to publish such a hash output depends on how unpredictable the input is. For low entropy (highly predictable) inputs, the number of hashes you need to compute in this guess-and-check method is small (or likely to be small). For high entropy inputs the number of evaluations is large.
If your input can be one of $2^128$ possible values and each possible value is equally probable, then the expected (or maximum) number of hashes that need to be tested is about $2^127$ (or $2^128$).
Your AES key is supposed to be unpredictable and come from a uniform distribution of all $2^128$ possible keys (or more for larger key sizes). Therefore if you publish only the hash of an AES key, people won't be able to learn anything about the key without on the order of $2^127$ brute-force-effort. The same amount of work it would take to guess an AES key by brute force attack.
People treat cryptographic hashes (like the SHA and Blake2 algorithms) like a random oracle in practice. (Information can still be leaked through side-channels of implementations, of course.) So publishing the SHA-2 hash of a secret key doesn't compromise security on it's own. Not anymore than publishing the cryptographic hash of any kind of secret with at least 128-bit entropy.
HOWEVER that doesn't mean your specific protocol or application won't use the hash of a secret key securely. As @RichieFrame said some other part of some software could be using the hash of the key differently, so it's risky. And as @MaartenBodewes says the key ID mechanism could be a security risk itself.
You also must not use a non-cryptographic hash.
I suggest you use a separate randomly generated key-ID instead of something derived from the key, if possible, to avoid potential errors.
IDs don't need to be randomly generated. Sequentially is fine if you are working in an entropy-constrained environment (but you do then have to worry about duplicate IDs if the source is restarted).
â Martin Bonner
Aug 31 at 11:56
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
In the standard model of hash functions there isn't a requirement that hash outputs not have properties that leak information about the input.
In the random oracle model of hash functions there isn't a relationship between input and output other than the input/output mapping you get from querying the oracle. The model says that for each input the corresponding output is assigned a value chosen randomly from a uniform distribution of all possible output values.
If a hash function behaves like a random oracle then the only way to learn about an input with just the output known to you is to try hashing inputs and look for matching results. (This is how password cracking works against defenders who use salts properly.)
How secure it would be to publish such a hash output depends on how unpredictable the input is. For low entropy (highly predictable) inputs, the number of hashes you need to compute in this guess-and-check method is small (or likely to be small). For high entropy inputs the number of evaluations is large.
If your input can be one of $2^128$ possible values and each possible value is equally probable, then the expected (or maximum) number of hashes that need to be tested is about $2^127$ (or $2^128$).
Your AES key is supposed to be unpredictable and come from a uniform distribution of all $2^128$ possible keys (or more for larger key sizes). Therefore if you publish only the hash of an AES key, people won't be able to learn anything about the key without on the order of $2^127$ brute-force-effort. The same amount of work it would take to guess an AES key by brute force attack.
People treat cryptographic hashes (like the SHA and Blake2 algorithms) like a random oracle in practice. (Information can still be leaked through side-channels of implementations, of course.) So publishing the SHA-2 hash of a secret key doesn't compromise security on it's own. Not anymore than publishing the cryptographic hash of any kind of secret with at least 128-bit entropy.
HOWEVER that doesn't mean your specific protocol or application won't use the hash of a secret key securely. As @RichieFrame said some other part of some software could be using the hash of the key differently, so it's risky. And as @MaartenBodewes says the key ID mechanism could be a security risk itself.
You also must not use a non-cryptographic hash.
I suggest you use a separate randomly generated key-ID instead of something derived from the key, if possible, to avoid potential errors.
In the standard model of hash functions there isn't a requirement that hash outputs not have properties that leak information about the input.
In the random oracle model of hash functions there isn't a relationship between input and output other than the input/output mapping you get from querying the oracle. The model says that for each input the corresponding output is assigned a value chosen randomly from a uniform distribution of all possible output values.
If a hash function behaves like a random oracle then the only way to learn about an input with just the output known to you is to try hashing inputs and look for matching results. (This is how password cracking works against defenders who use salts properly.)
How secure it would be to publish such a hash output depends on how unpredictable the input is. For low entropy (highly predictable) inputs, the number of hashes you need to compute in this guess-and-check method is small (or likely to be small). For high entropy inputs the number of evaluations is large.
If your input can be one of $2^128$ possible values and each possible value is equally probable, then the expected (or maximum) number of hashes that need to be tested is about $2^127$ (or $2^128$).
Your AES key is supposed to be unpredictable and come from a uniform distribution of all $2^128$ possible keys (or more for larger key sizes). Therefore if you publish only the hash of an AES key, people won't be able to learn anything about the key without on the order of $2^127$ brute-force-effort. The same amount of work it would take to guess an AES key by brute force attack.
People treat cryptographic hashes (like the SHA and Blake2 algorithms) like a random oracle in practice. (Information can still be leaked through side-channels of implementations, of course.) So publishing the SHA-2 hash of a secret key doesn't compromise security on it's own. Not anymore than publishing the cryptographic hash of any kind of secret with at least 128-bit entropy.
HOWEVER that doesn't mean your specific protocol or application won't use the hash of a secret key securely. As @RichieFrame said some other part of some software could be using the hash of the key differently, so it's risky. And as @MaartenBodewes says the key ID mechanism could be a security risk itself.
You also must not use a non-cryptographic hash.
I suggest you use a separate randomly generated key-ID instead of something derived from the key, if possible, to avoid potential errors.
answered Aug 31 at 5:49
Future Security
1,4171116
1,4171116
IDs don't need to be randomly generated. Sequentially is fine if you are working in an entropy-constrained environment (but you do then have to worry about duplicate IDs if the source is restarted).
â Martin Bonner
Aug 31 at 11:56
add a comment |Â
IDs don't need to be randomly generated. Sequentially is fine if you are working in an entropy-constrained environment (but you do then have to worry about duplicate IDs if the source is restarted).
â Martin Bonner
Aug 31 at 11:56
IDs don't need to be randomly generated. Sequentially is fine if you are working in an entropy-constrained environment (but you do then have to worry about duplicate IDs if the source is restarted).
â Martin Bonner
Aug 31 at 11:56
IDs don't need to be randomly generated. Sequentially is fine if you are working in an entropy-constrained environment (but you do then have to worry about duplicate IDs if the source is restarted).
â Martin Bonner
Aug 31 at 11:56
add a comment |Â
up vote
10
down vote
I would do it a little differently so there is less of a relationship between the ID and the key
Encrypt a block of all 0s with the key; $X$ = $E_k(0_128)$
Hash X; $H$ = SHA256$(X)$
Truncate the hash to 32 bits (8 hex characters)
Encrypting a block of 0s and truncating is generally how a key check value is generated, as block ciphers are designed to resist key recovery, the intermediate hash step is there for extra security, so you are not exposing a known ciphertext value.
I would not consider a direct key hash safe, some software may use that internally, and you do not want that exposed
What do you mean by 0s?
â Aymn Alaney
Aug 31 at 1:32
@AymnAlaney 0 bits, AES has a 128-bit block size, so all of them 0 and not 1
â Richie Frame
Aug 31 at 1:47
2
If software was to use a hash over a secret key internally other than to identify the key I would consider the software broken. But I like the idea to add an additional hash over the regular KCV, which has broad support but may indeed be insecure...
â Maarten Bodewes
Aug 31 at 1:50
add a comment |Â
up vote
10
down vote
I would do it a little differently so there is less of a relationship between the ID and the key
Encrypt a block of all 0s with the key; $X$ = $E_k(0_128)$
Hash X; $H$ = SHA256$(X)$
Truncate the hash to 32 bits (8 hex characters)
Encrypting a block of 0s and truncating is generally how a key check value is generated, as block ciphers are designed to resist key recovery, the intermediate hash step is there for extra security, so you are not exposing a known ciphertext value.
I would not consider a direct key hash safe, some software may use that internally, and you do not want that exposed
What do you mean by 0s?
â Aymn Alaney
Aug 31 at 1:32
@AymnAlaney 0 bits, AES has a 128-bit block size, so all of them 0 and not 1
â Richie Frame
Aug 31 at 1:47
2
If software was to use a hash over a secret key internally other than to identify the key I would consider the software broken. But I like the idea to add an additional hash over the regular KCV, which has broad support but may indeed be insecure...
â Maarten Bodewes
Aug 31 at 1:50
add a comment |Â
up vote
10
down vote
up vote
10
down vote
I would do it a little differently so there is less of a relationship between the ID and the key
Encrypt a block of all 0s with the key; $X$ = $E_k(0_128)$
Hash X; $H$ = SHA256$(X)$
Truncate the hash to 32 bits (8 hex characters)
Encrypting a block of 0s and truncating is generally how a key check value is generated, as block ciphers are designed to resist key recovery, the intermediate hash step is there for extra security, so you are not exposing a known ciphertext value.
I would not consider a direct key hash safe, some software may use that internally, and you do not want that exposed
I would do it a little differently so there is less of a relationship between the ID and the key
Encrypt a block of all 0s with the key; $X$ = $E_k(0_128)$
Hash X; $H$ = SHA256$(X)$
Truncate the hash to 32 bits (8 hex characters)
Encrypting a block of 0s and truncating is generally how a key check value is generated, as block ciphers are designed to resist key recovery, the intermediate hash step is there for extra security, so you are not exposing a known ciphertext value.
I would not consider a direct key hash safe, some software may use that internally, and you do not want that exposed
answered Aug 31 at 1:28
Richie Frame
9,58411530
9,58411530
What do you mean by 0s?
â Aymn Alaney
Aug 31 at 1:32
@AymnAlaney 0 bits, AES has a 128-bit block size, so all of them 0 and not 1
â Richie Frame
Aug 31 at 1:47
2
If software was to use a hash over a secret key internally other than to identify the key I would consider the software broken. But I like the idea to add an additional hash over the regular KCV, which has broad support but may indeed be insecure...
â Maarten Bodewes
Aug 31 at 1:50
add a comment |Â
What do you mean by 0s?
â Aymn Alaney
Aug 31 at 1:32
@AymnAlaney 0 bits, AES has a 128-bit block size, so all of them 0 and not 1
â Richie Frame
Aug 31 at 1:47
2
If software was to use a hash over a secret key internally other than to identify the key I would consider the software broken. But I like the idea to add an additional hash over the regular KCV, which has broad support but may indeed be insecure...
â Maarten Bodewes
Aug 31 at 1:50
What do you mean by 0s?
â Aymn Alaney
Aug 31 at 1:32
What do you mean by 0s?
â Aymn Alaney
Aug 31 at 1:32
@AymnAlaney 0 bits, AES has a 128-bit block size, so all of them 0 and not 1
â Richie Frame
Aug 31 at 1:47
@AymnAlaney 0 bits, AES has a 128-bit block size, so all of them 0 and not 1
â Richie Frame
Aug 31 at 1:47
2
2
If software was to use a hash over a secret key internally other than to identify the key I would consider the software broken. But I like the idea to add an additional hash over the regular KCV, which has broad support but may indeed be insecure...
â Maarten Bodewes
Aug 31 at 1:50
If software was to use a hash over a secret key internally other than to identify the key I would consider the software broken. But I like the idea to add an additional hash over the regular KCV, which has broad support but may indeed be insecure...
â Maarten Bodewes
Aug 31 at 1:50
add a comment |Â
up vote
-3
down vote
Hashing does not provide confidentiality, and theoretically your scheme is broken.
PS: This is exact and correct answer to the OP question, and I will not delete it.
Please downvote to show your cryptographic illiteracy.
1
1) Maybe remove the outright anger from your answer? 2) Maybe add some more context? I suspect the downvotes are because a one-sentence answer (correct or otherwise) is not explaining anything.
â Mike Ounsworth
Aug 31 at 10:53
1
I have edited your answer to remove what Mike callled "the anger". Please do not insult your readers, this is never well-received.
â SEJPMâ¦
Aug 31 at 11:59
add a comment |Â
up vote
-3
down vote
Hashing does not provide confidentiality, and theoretically your scheme is broken.
PS: This is exact and correct answer to the OP question, and I will not delete it.
Please downvote to show your cryptographic illiteracy.
1
1) Maybe remove the outright anger from your answer? 2) Maybe add some more context? I suspect the downvotes are because a one-sentence answer (correct or otherwise) is not explaining anything.
â Mike Ounsworth
Aug 31 at 10:53
1
I have edited your answer to remove what Mike callled "the anger". Please do not insult your readers, this is never well-received.
â SEJPMâ¦
Aug 31 at 11:59
add a comment |Â
up vote
-3
down vote
up vote
-3
down vote
Hashing does not provide confidentiality, and theoretically your scheme is broken.
PS: This is exact and correct answer to the OP question, and I will not delete it.
Please downvote to show your cryptographic illiteracy.
Hashing does not provide confidentiality, and theoretically your scheme is broken.
PS: This is exact and correct answer to the OP question, and I will not delete it.
Please downvote to show your cryptographic illiteracy.
edited Aug 31 at 16:35
answered Aug 31 at 2:05
kludg
64649
64649
1
1) Maybe remove the outright anger from your answer? 2) Maybe add some more context? I suspect the downvotes are because a one-sentence answer (correct or otherwise) is not explaining anything.
â Mike Ounsworth
Aug 31 at 10:53
1
I have edited your answer to remove what Mike callled "the anger". Please do not insult your readers, this is never well-received.
â SEJPMâ¦
Aug 31 at 11:59
add a comment |Â
1
1) Maybe remove the outright anger from your answer? 2) Maybe add some more context? I suspect the downvotes are because a one-sentence answer (correct or otherwise) is not explaining anything.
â Mike Ounsworth
Aug 31 at 10:53
1
I have edited your answer to remove what Mike callled "the anger". Please do not insult your readers, this is never well-received.
â SEJPMâ¦
Aug 31 at 11:59
1
1
1) Maybe remove the outright anger from your answer? 2) Maybe add some more context? I suspect the downvotes are because a one-sentence answer (correct or otherwise) is not explaining anything.
â Mike Ounsworth
Aug 31 at 10:53
1) Maybe remove the outright anger from your answer? 2) Maybe add some more context? I suspect the downvotes are because a one-sentence answer (correct or otherwise) is not explaining anything.
â Mike Ounsworth
Aug 31 at 10:53
1
1
I have edited your answer to remove what Mike callled "the anger". Please do not insult your readers, this is never well-received.
â SEJPMâ¦
Aug 31 at 11:59
I have edited your answer to remove what Mike callled "the anger". Please do not insult your readers, this is never well-received.
â SEJPMâ¦
Aug 31 at 11:59
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f61915%2fcan-i-hash-a-secret-key-and-used-the-hash-as-key-id%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
So you're essentially looking for an AES equivalent of an RSA public key fingerprint?
â Mike Ounsworth
Aug 31 at 1:35
2
Beware that an attacker may change the key ID and indicate a different, possibly less secure key. If you leave an insecure test key or similar you may be in trouble. If you use CBC (especially without additional protection from HMAC) I would seriously question the security of your protocol, up to and including the confidentiality of the messages.
â Maarten Bodewes
Aug 31 at 1:54
The chat app Telegram has a symmetric 256 byte key (authkey) between client and server and it uses 8 bytes of its SHA-1 hash as a key identifier.
â Henno Brandsma
Aug 31 at 22:17