Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I am beginner to Cryptography. And recently I came across the requirement like "use of SHA-256 in cryptography".

Does "use of SHA-256 in cryptography" imply use of SHA-256 both in HMAC and DH key exchange, assuming these are the only uses of hash in system?

I would be very thankful if people can provide their views.

EDIT

To explain the situation…

There is requirement to use SHA-256 in our product (embedded system) for SSH. As far I understand, SHA-256 is used in two places: one in diffie hellman key exchange and another in HMAC calculation. The confusion is – if we are planning to use SHA-256, then shall we use it in both the places or only for HMAC calculation?

share|improve this question

closed as unclear what you're asking by figlesquidge, AFS, DrLecter, e-sushi, hunter Mar 7 at 16:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
in all the things –  Richie Frame Mar 7 at 9:02
    
Is it ok to use SHA1 in diffie hellman key exchange and SHA-256 in HMAC ?? –  Rakesh Gupta Mar 7 at 9:05
2  
SHA-256 is just a digest algorithm. It can be used wherever a digest can be used. There's no such term as "use of SHA-256 in cryptography", it's just a sentence. –  izaera Mar 7 at 9:30
    
For a useful answer, we need more context; like, the whole sentence; or if there there is some implicit requirement like: give some use of SHA-256 in cryptography; or if it is the title of some other material. –  fgrieu Mar 7 at 9:33
    
@fgrieu : There is requirement to use SHA-256 in our product (embedded system) for SSH. As far I understand, SHA-256 is used in two places, one in diffie hellman key exchange and another in HMAC calculation. The confusion is if we are planning to use SHA-256 then shall we use it in both the places or only for HMAC calculation. I hope it's clear now. –  Rakesh Gupta Mar 7 at 10:01
show 2 more comments