Questions tagged [encryption-symmetric]

A type of encryption where the same key is used to encrypt and decrypt the message.

Symmetric encryption is the oldest and best-known technique. A secret key, which can be a number, a word, or just a string of random letters, is applied to the text of a message to change the content in a particular way. This might be as simple as shifting each letter by a number of places in the alphabet (known as the Caesar Cipher), or as complicated as the Advanced Encryption Standard, which is used in some modern cryptography. Anyone who knows the key can either encrypt or decrypt a message.

Note that symmetric encryption does not require that the encryption and decryption key be identical, but rather that both keys derive from the same knowledge. For example, a letter-shifting cipher might require that "A" be enciphered as "G" - the opposite operation would be needed to decrypt.

736 questions
9
votes
2 answers

Securely Storing Optional Entropy While Using DPAPI

So I am trying to store the symmetric key using DPAPI. All is well and great, but what to do with the entropy? This answered question here really doesn't provide enough insight. It seems like a slippery slope - I could use the machine store to store…
user195488
9
votes
1 answer

AES managed encryption values always end in ==?

I've written an encryption routine built from several methods on the net. I'm currently testing the encryption and have noticed that every encrypted value end in '==' ? Does anyone know why this might be the case ? This is the code I'm using. The…
SteveB
  • 1,474
  • 1
  • 13
  • 21
8
votes
6 answers

C# AES Rijndael - detecting invalid passwords

I'm using Rijndael to encrypt some sensitive data in my program. When the user enters an incorrect password, most of the time a CryptographicException is thrown with the message "Padding is invalid and cannot be removed.". However, with very small…
Ozzah
  • 10,631
  • 16
  • 77
  • 116
8
votes
3 answers

openssl_encrypt() randomly fails - IV passed is only ${x} bytes long, cipher expects an IV of precisely 16 bytes

This is the code I use to encrypt/decrypt the data: // Set the method $method = 'AES-128-CBC'; // Set the encryption key $encryption_key = 'myencryptionkey'; // Generet a random initialisation vector $iv =…
wube
  • 923
  • 2
  • 10
  • 22
8
votes
1 answer

Proper password storage and retrieval for service accounts?

Most of the information that I found and read about properly storing passwords in a database say that I should Hash the password clear text with a unique salt value for each user and then store that hash in the database. But this process doesn't…
λ Jonas Gorauskas
  • 6,121
  • 6
  • 45
  • 66
8
votes
1 answer

Golang AES StreamReader encryption - Example omits any authentication of the encrypted data

Finally I am posting my first question on StackOverflow. I'm using this site for years now and I always found great answers to all my questions :) I am implementing a file encryption background daemon which is based on the official Golang cipher…
M4ng0Squ4sh
  • 83
  • 1
  • 5
8
votes
2 answers

Why can I encrypt data with one DES key and successfully decrypt with another?

I tried to implement DES algorithm using pyDes and Crypto.Cipher.DES modules. I found a problem that when I encrypt with 82514145 key and then decrypt the cipher with 93505044 I can retrieve the decrypted text. I found 256 keys behaving like this.…
ceasif
  • 345
  • 2
  • 14
8
votes
1 answer

Illegal Block Size Exception Input length must be multiple of 16 when decrypting with padded cipher

In my application I am encrypting and decrypting data using secretKey. For that I am using AES algorithm. But I am getting exception in decrypt, one value out of three already encrypted values using secret key. Exception is: Illegal Block Size…
JankiPanwala
  • 584
  • 1
  • 4
  • 20
7
votes
5 answers

high-level ruby library for encryption

It seems like the most established ones like keyczar, cryptlib and NaCl are not available for Ruby. What are some ruby libraries (or bindings) for a high-level library where decisions about cryptographic primitives have been made for you (no need to…
m33lky
  • 7,055
  • 9
  • 41
  • 48
7
votes
3 answers

Using Rijndael encryption for large files

I'm in a situation where I need to encrypt / decrypt a file of n length securely, ideally using Rijndael, but definitely at 256bit encryption. I've played around with encryption before and have encrypted/decrypted strings and byte arrays quite…
Sk93
  • 3,676
  • 3
  • 37
  • 67
7
votes
4 answers

mcrypt doesn't work in PHP 5.6 on windows/IIS

I have been making heavy use of mcrypt in my php app for years, both on win/IIS and on linux. Although I'm running PHP 5.4.28 on my linux server, I just upgraded to PHP 5.6.11 on my windows 8.1 IIS box. And mcrypt no longer works. It doesn't throw…
HerrimanCoder
  • 6,835
  • 24
  • 78
  • 158
7
votes
3 answers

RSA and AES encryption

I am looking at the feasibility for using Chrome apps for the front end of some applications I am working on. (As an aside, if anyone has any thoughts on this - put it in the comments) I would be using chrome.socket and would want the connections…
7
votes
2 answers

Questions about the NaCL crypto library

I was looking for libraries to implement an encryption system and was interested in using the NaCl: Networking and Cryptography library specifically the box function. Obviously, it uses symmetric encryption XSalsa20, Curve25519 for public-private…
6
votes
1 answer

Symmetric encryption using Fernet in Python - Master password use case

I've been trying to understand how symmetric encryption works and how I can integrate it in my CLI application but I've got stuck at some point which I'm going to describe below. My use case is the following: I have a CLI application (SQLAlchemy +…
6
votes
1 answer

Initialization vector - best practices (symmetric cryptography)

I would like to ask about best practices regarding a usage of an initialization vector (IV) and a key for symmetric cryptography algorithms. I want to accept messages from a client, encrypt them and store in a backend. This will be done over a time,…
query
  • 329
  • 7
  • 18
1 2
3
48 49