Can I hash a secret key and used the hash as key ID?

The name of the pictureThe name of the pictureThe name of the pictureClash 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?










share|improve this question























  • 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














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?










share|improve this question























  • 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












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?










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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
















  • 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










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.






share|improve this answer




















  • 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

















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






share|improve this answer




















  • 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


















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.






share|improve this answer


















  • 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










Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "281"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















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






























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.






share|improve this answer




















  • 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














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.






share|improve this answer




















  • 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












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.






share|improve this answer












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.







share|improve this answer












share|improve this answer



share|improve this answer










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
















  • 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










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






share|improve this answer




















  • 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















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






share|improve this answer




















  • 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













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






share|improve this answer












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







share|improve this answer












share|improve this answer



share|improve this answer










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

















  • 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











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.






share|improve this answer


















  • 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














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.






share|improve this answer


















  • 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












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.






share|improve this answer














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.







share|improve this answer














share|improve this answer



share|improve this answer








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












  • 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

















 

draft saved


draft discarded















































 


draft saved


draft discarded














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













































































這個網誌中的熱門文章

How to combine Bézier curves to a surface?

Mutual Information Always Non-negative

Why am i infinitely getting the same tweet with the Twitter Search API?