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
15
votes
4 answers

Which symmetric key algorithm does SSL use?

I understand that through SSL, the browser gets the public key of the secured website and through public key encryption rsa algorithm, these 2 establish session key and then continue communication thru some symmetric algorithm, because symmetric key…
xyz
  • 8,607
  • 16
  • 66
  • 90
15
votes
2 answers

Encryption between desktop app and server - C# to PHP

I have an app which is designed in C#. In simple terms the app sends data and image to my web server which takes all the $_POST data and processes it. I will confess i do not understand how the security end of things work. I will employ someone with…
user1547410
  • 863
  • 7
  • 27
  • 58
15
votes
4 answers

Best practices for (symmetric) encryption in .Net?

What is considered "best practice" for encrypting certain sensitive or personally identifiable data in a SQL database (under PCI, HIPAA, or other applicable compliance standards)? There are many questions here regarding individual aspects of a…
cdonner
  • 37,019
  • 22
  • 105
  • 153
13
votes
3 answers

SQL Encrypted Columns in WHERE Clause

I am looking to apply SQL column level encryption using symmetric keys. The initial steps needed to create the Database Master Key, Certificates and Symmetric Keys seems straight forward and I have tested encrypting/decrypting data using Symmetric…
Matt F
  • 585
  • 1
  • 6
  • 20
13
votes
6 answers

generating AES 256 bit key value

Does anyone know of a way to get a 256 bit key value generated from a pass phrase of any length? The encryption cannot be salted as the encrypted values need to be generated again and compared in the database. So a value must generate the same…
SteveB
  • 1,474
  • 1
  • 13
  • 21
12
votes
5 answers

PyCrypto problem using AES+CTR

I'm writing a piece of code to encrypt a text using symmetric encryption. But it's not coming back with the right result... from Crypto.Cipher import AES import os crypto = AES.new(os.urandom(32), AES.MODE_CTR, counter = lambda :…
xster
  • 6,269
  • 9
  • 55
  • 60
12
votes
3 answers

Help me with XOR encryption

I wrote this code in C# to encrypt a string with a key: private static int Bin2Dec(string num) { int _num = 0; for (int i = 0; i < num.Length; i++) _num += (int)Math.Pow(2, num.Length - i - 1) * int.Parse(num[i].ToString()); …
fardjad
  • 20,031
  • 6
  • 53
  • 68
11
votes
3 answers

Reduce the encrypted string length in codeigniter

When i try to encrypt a string using encryption library by CI, the returned string is very big,around 178 chars long. Is there is any method to reduce the length of the string. default cipher is: AES-128. Suppose:…
Tibin
  • 612
  • 1
  • 8
  • 21
11
votes
3 answers

Encryption and decryption with private key in Java

After I have read articles about Cryptography(Symmetric and Asymmetric) methods.Many articles are telling that Private key is used to encrypt and decrypt data.Public key is used to encrypt data.But When I try to start implementing in Java I can't…
11
votes
2 answers

Where to Store Encryption Keys MVC Application

I am using a AES encryption/decryption class that needs a key value and vector value encrypt and decrypt data in an MVC3 application. On saving the record I am encrypting the data then storing in a database. When i retrieve the record i am…
10
votes
1 answer

gpg-agent in gpg2

I'm attempting to futureproof some custom software that utilizes GPG (currently v 1.4.10) to perform symmetric encryption/decryption processes. My current encryption command looks like this: gpg --batch --no-tty --no-use-agent --symmetric…
Frank Koehl
  • 3,104
  • 2
  • 29
  • 37
10
votes
4 answers

Safe non-tamperable URL component in Perl using symmetric encryption?

OK, I'm probably just having a bad Monday, but I have the following need and I'm seeing lots of partial solutions but I'm sure I'm not the first person to need this, so I'm wondering if I'm missing the obvious. $client has 50 to 500 bytes worth of…
Randal Schwartz
  • 39,428
  • 4
  • 43
  • 70
10
votes
5 answers

Stopping decryption before EOF throws exception: Padding is invalid and cannot be removed

This is the scenario we have: We have huge encrypted files, in the order of gigabytes that we can decrypt correctly if we read them until the end. The problem arises when we are reading and detect some flag in the file, then we stop reading and…
emmanuel
  • 765
  • 8
  • 15
10
votes
5 answers

Simple code to encrypt an .INI file string using a password

I am looking for something more sophisticated than ROT13, but which does not require a library (preferablly not even a unit, just a drop in function). I want to symetrically encrypt/decrypt a given string with a password provided by the user.…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
10
votes
3 answers

Encryption and Decryption between Android, PHP & node.js

I'm trying to encrypt a string in Java on Android, and then decrypt it using PHP and/or node.js I've tried http://www.androidsnippets.com/encrypt-decrypt-between-android-and-php, but only the first half the returned hex string works. I want the…
giggsey
  • 933
  • 2
  • 11
  • 31
1
2
3
48 49