[Solved] What is this encryption type? [closed]

Looks like Base64 to me. Any time I see encoding ending with ‘=’ or ‘==’ it is my first guess. I can see ‘sales’ and ‘product id’ after decoding your first example though it isn’t completely readable. May be double encoded or have other non-printable characters as field delimiters. Hopefully this gets you heading in … Read more

[Solved] Got stuck with Caesar.c

A function to caesar an alphabetic char should be like (decomposed in elementary steps): int caesar_lower(int c,int key) { int v = c-‘a’; // translate ‘a’–‘z’ to 0–25 v = v+key; // translate 0–25 to key–key+25 v = v%26; // translate key–key+25 to key–25,0–key-1 v = v+’a’; // translate back 0–25 to ‘a’–‘z’ return v; … Read more

[Solved] Help me, throwing exception error in decoding code. help needed

You haven’t said what error you’re getting, but surely your second code should simply be: return Encoding.UTF8.GetString(Convert.FromBase64String(data)); You don’t need to create a new UTF8Encoding You don’t need to worry about decoders explicitly Additionally, your exception handling is nasty – the stack trace would already show where the error occurs, but by catching it and … Read more

[Solved] How would I make a simple encryption/decryption program? [closed]

Use two dicts to do the mapping, one from letters to encryption_code and the reverse to decrypt: letters=”ABCDEFGHIJKLMNOPQRSTUVWXYZ” encryption_code=”LFWOAYUISVKMNXPBDCRJTQEGHZ” enc = dict(zip(letters,encryption_code)) dec = dict(zip(encryption_code, letters)) s = “HELLO WORLD” encr = “”.join([enc.get(ch, ch) for ch in s]) decr = “”.join([dec.get(ch, ch) for ch in encr]) print(encr) print(decr) Output: IAMMP EPCMO HELLO WORLD Using your … Read more

[Solved] Decrypt aes encrypted file in java sha1 openssl

The below code is doing a complete file encryption and decryption and is compatible to the OpenSSL commands encrypt: openssl enc -aes-256-cbc -pass pass:testpass -d -p -in plaintext.txt -out plaintext.txt.crypt -md md5 decrypt: openssl aes-256-cbc -d -in plaintext.txt.crypt -out plaintext1.txt -k testpass -md md5 I left out some variables as they are not used in … Read more

[Solved] Encrypting the password using salt in c# [closed]

(As suggested, I’ve replaced my previous salt generation method with something that should be more secure) To generate a random salt: public static string GenerateRandomSalt(RNGCryptoServiceProvider rng, int size) { var bytes = new Byte[size]; rng.GetBytes(bytes); return Convert.ToBase64String(bytes); } var rng = new RNGCryptoServiceProvider(); var salt1 = GenerateRandomSalt(rng, 16); var salt2 = GenerateRandomSalt(rng, 16); // etc. … Read more

[Solved] encrypt file with SHA256 using C/C++

SHA 256 stands for Secure Hash Algorithm ! It will only produce the hash of a given file . You can’t retrieve the original file from a given hash otherwise hash functions are useless. If you want to do encryption/decryption AES would be a better solution. Everything you need is in OpenSSL. solved encrypt file … Read more

[Solved] A book that contains, Shor’s algorithm, McEliece cryptosystem, Lattice-based cryptography, Discrete logarithm [closed]

There is “Post-Quantum Cryptography” published by Daniel J. Bernstein. The book is more of a general overview and doesn’t go that far into details. It contains sections about lattice based, hash based and code based cryptography. Shor’s algorithm as well as discrete logarithm aren’t handled in depth, but there is a general overview. I think … Read more

[Solved] Bad Data exception during RSA decryption

Among other problems you are assuming that the ciphertext can be converted to UTF-8 meaningfully, and that isn’t guaranteed. If you want to encrypt text and transmit/store the encrypted contents as text you need to follow this pattern: Encrypt(textIn => textOut): Convert textIn to bytesIn via some encoding. UTF-8 is pretty good. Encrypt bytesIn to … Read more