Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6720535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:13:26+00:00 2026-05-26T09:13:26+00:00

EDIT: Sorry I forgot to mention, I’m not using the implemented sha512 crypt because

  • 0

EDIT: Sorry I forgot to mention, I’m not using the implemented sha512 crypt because as far as I can tell it doesn’t involve a salt value or a specified number of rounds to compute the hash with.

Okay so I’m coding the sha-512 crypt in c# and I’m following the steps found here…

http://people.redhat.com/drepper/SHA-crypt.txt

This is my first time doing anything encryption related so I want to make sure I’m understanding the steps correctly… I don’t understand c code well enough to direct translation from c to c# :/

I have assumed finishing a digest is the same as computing the hash. In this case, I’ve also assumed that when the steps refer to a finished digest, they are referring the the computed hash, rather than the pre-hash computed digest bytes. Correct me if I’m wrong please!

Assuming everything has been done correctly for steps 1-8, my doubts start at step 9

9. For each block of 32 or 64 bytes in the password string (excluding
the terminating NUL in the C representation), add digest B to digest A

Since I’m using SHA-512, I have block sizes of 64 bytes.

Would the following code produce the desired result?

//FYI, temp = digestA from steps 1-3 (before expanding digestA for step 9)
//alt_result = computed digestB hash (64 byte hash)

for (cnt = key.Length; cnt > 64; cnt -= 64)                         //9
{
    int i = 0;
    ctx.TransformBlock(alt_result, 0, 64, digestA, temp.Length + 64 * i);
    i++;
}

If anyone can clarify that what I’ve stated is correct, I would appreciate it. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:13:26+00:00Added an answer on May 26, 2026 at 9:13 am

    Salting is as simple as appending a fixed byte string on the end of your input string. Essentially providing a known “homegrown” transform to your input.

    About the algorithm itself: you seem to be starting at a disadvantage. A neophyte, you’re making a lot of “assumptions” about basic crypting terminology that even need clarification. If the CLR implementation won’t work for you, I think your time would be better spent finding a good C implementation and figuring out how to integrate to that. Figuring out the interop (extern) calls to that will be far easier than diving into the intracacies of crypting, the results will be more efficient, and the knowledge you gain about native interop will be far more useful/reusable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT Sorry I forgot the most important part here. Each key can have more
EDIT: Sorry, forgot to mention this was a C++/CLI project. Does it show it
Edit: I'm sorry, but I forgot to mention that I'll need the values of
Edit: I am using SqlDataAdapters to fill the data sets. Sorry--I should have been
IMPORTANT EDIT: Sorry everyone, i made a big mistake in the structure. char *name;
Is there a .net equivalent to the C++ unexpected()/set_unexpected() functionality? Edit: Sorry--I omitted some
Edit: I fixed the problem by just starting from scratch. Sorry to waste y'alls
Edit: When I say SQL Server, I'm really talking about the Management Studio. Sorry
Sorry if this question will sound too chaotic, feel free to edit it. I
readdir returns info about all item within the directory. How can I tell if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.