Tags: adriank31/HSM_AES256
Tags
Add files via upload This C program provides a secure method for users to input a password and a message, and then it performs cryptographic operations to ensure security and integrity. 📌 Key Features & Functionalities User Input Handling Prompts the user to enter a password and a message securely. Uses getline() for dynamic input handling. Password Strength Validation Analyzes the password for: Uppercase letters Lowercase letters Numbers Special characters Assigns a strength score and forces the user to re-enter if the password is weak. Salt Generation Generates a random 32-byte salt using RAND_bytes(). Ensures password hashing is unique for each user. SHA-256 Hashing for Password Storage Concatenates Salt + Password to create a salted password. Hashes the salted password using SHA-256 for secure storage. HMAC-SHA-256 for Message Authentication Uses the hashed password as a secret key to compute HMAC-SHA-256 on the user’s message. Ensures message integrity & authenticity. Secure Output in Hexadecimal Format Prints salt, password hash, and HMAC in hex format for better readability. Memory Management & Security Dynamically allocates memory for input strings. Properly frees memory after use to prevent memory leaks.
Add files via upload This C program provides a secure method for users to input a password and a message, and then it performs cryptographic operations to ensure security and integrity. 📌 Key Features & Functionalities User Input Handling Prompts the user to enter a password and a message securely. Uses getline() for dynamic input handling. Password Strength Validation Analyzes the password for: Uppercase letters Lowercase letters Numbers Special characters Assigns a strength score and forces the user to re-enter if the password is weak. Salt Generation Generates a random 32-byte salt using RAND_bytes(). Ensures password hashing is unique for each user. SHA-256 Hashing for Password Storage Concatenates Salt + Password to create a salted password. Hashes the salted password using SHA-256 for secure storage. HMAC-SHA-256 for Message Authentication Uses the hashed password as a secret key to compute HMAC-SHA-256 on the user’s message. Ensures message integrity & authenticity. Secure Output in Hexadecimal Format Prints salt, password hash, and HMAC in hex format for better readability. Memory Management & Security Dynamically allocates memory for input strings. Properly frees memory after use to prevent memory leaks.
Add files via upload This C program provides a secure method for users to input a password and a message, and then it performs cryptographic operations to ensure security and integrity. 📌 Key Features & Functionalities User Input Handling Prompts the user to enter a password and a message securely. Uses getline() for dynamic input handling. Password Strength Validation Analyzes the password for: Uppercase letters Lowercase letters Numbers Special characters Assigns a strength score and forces the user to re-enter if the password is weak. Salt Generation Generates a random 32-byte salt using RAND_bytes(). Ensures password hashing is unique for each user. SHA-256 Hashing for Password Storage Concatenates Salt + Password to create a salted password. Hashes the salted password using SHA-256 for secure storage. HMAC-SHA-256 for Message Authentication Uses the hashed password as a secret key to compute HMAC-SHA-256 on the user’s message. Ensures message integrity & authenticity. Secure Output in Hexadecimal Format Prints salt, password hash, and HMAC in hex format for better readability. Memory Management & Security Dynamically allocates memory for input strings. Properly frees memory after use to prevent memory leaks.