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
3
votes
2 answers

How do I use AES_CBC_Encrypt 128 openssl properly in Ubuntu?

Still finding it hard to work with memory in C. I'm reading a text file, where I store each line of text containing a name and random string of 40 characters exactly, into 2 buffers, char buffer1[128] and char buffer2[128] using fscanf() which…
val37
  • 67
  • 1
  • 1
  • 8
3
votes
1 answer

"Invalid keystore format" on setting keystore for type "JCEKS" for symmetric key encryption

I am trying to use symmetric encryption for securing the communication on jetty-9 using java-8. The cipher suite for this purpose I am using is "TLS_PSK_WITH_AES_128_GCM_SHA256". The implementation for this cipher suite is provided by third party…
3
votes
3 answers

Diffie-Hellman in Silverlight

I am trying to devise a security scheme for encrypting the application level data between a silverlight client, and a php webservice that I created. Since I am dealing with a public website the information I am pulling from the service is public,…
cmaduro
  • 1,672
  • 3
  • 21
  • 40
3
votes
0 answers

Android decryption: Error while finalizing cipher

I am using Android to encrypt and encrypt images sent between apps. The encryption works well but when the file arrives at the destination it will not decrypt. Now I have copied the file at the destination app and decrypted it successfully using…
Ronan Diffily
  • 31
  • 1
  • 3
3
votes
3 answers

Symmetric cryptography and salt

I need to encrypt two-way (symmetric) distinct tokens. These tokens are expected to be repeated (e.g. They are people first names), but I do not want an attacker to conclude which encrypted tokens came from the same original tokens. Salt is the way…
yannisf
  • 6,016
  • 9
  • 39
  • 61
3
votes
2 answers

DecryptByKey returns null SQL Server 2012

I am trying to decryptbykey and it returns null. --CREATE MASTER KEY ENCRYPTION --BY PASSWORD = 'Password1' --CREATE CERTIFICATE MyCert --WITH SUBJECT = 'MyCert' --CREATE SYMMETRIC KEY MyKey --WITH ALGORITHM = TRIPLE_DES ENCRYPTION --BY…
drizzie
  • 3,351
  • 2
  • 27
  • 32
3
votes
1 answer

Using password salt as IV in password-based encryption

I need to write a simplified encryption API that can easily deal with symmetric encryption, either by using a random generated key or a password-derived key. The password generation is performed with the PKCS5_PBKDF2_HMAC() function from the OpenSSL…
Silviu
  • 33
  • 6
3
votes
1 answer

AESManaged File Encryption and Decryption and prepending initiaization vector

I am trying to encrypt/decrypt bytes - I have done a lot of reading about the Key and IV for the AES algorithm using the AESManaged class in System.Security.Cryptography. I read James Johnson's answer to the following question…
Paul
  • 1,103
  • 1
  • 13
  • 18
3
votes
2 answers

encrypting with AES CBC Java

I have little problem. When I try to encrypt text and then decrypt this text I get an error: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher Here is my code: import…
Grzesiek
  • 69
  • 2
  • 8
3
votes
2 answers

Padding in AES CBC

I am trying to test CBC with Random IV using (128-bit AES) in C#. In my question to solve, I have 12-byte input message. The condition is that if PlainText is less than block-size (16-bytes) the padding to be used starts with 0x01 and then upto 6…
3
votes
2 answers

encrypt a folder of html files and use files in java application after decryption

Possible Duplicate: encrypt the html files for client side and browse them in a swing application I am working on a swing application in which in which client has to access the html files locally stored in the machine but i want client should not…
adesh
  • 1,157
  • 3
  • 18
  • 28
3
votes
1 answer

AES GCM manual byte[] concatenation of IV and tag to encrypted information

I am using AES 256 encryption in GCM mode using a class called AuthenticatedAesCng from this site: CLR security After writing the plaintext through the crypto stream, I manually concatenate the IV, TAG, and encrypted data, then return that value.…
crawfish
  • 853
  • 4
  • 11
  • 14
3
votes
1 answer

AES cipher in GCM, CCM, or CBC-MAC mode?

I've been looking around for an article describing these modes in layman's terms but have not yet found anything helpful. So, what are the positives and negatives of each mode? Thanks GCM CCM CBC-MAC
crawfish
  • 853
  • 4
  • 11
  • 14
2
votes
3 answers

Rijndael padding or length is invalid

I am trying to encrypt/decrypt a string using eith Rijndael or Aes and the code below. public class Crypto { private const string defaultVector = "asdfg123456789"; private const CipherMode cipherMode = CipherMode.CBC; //Have tried…
PMontgomery
  • 424
  • 4
  • 17
2
votes
3 answers

Symmetric encryption key vs. Asymmetric keys - ssl

I am developing a client server app that uses ssl (openssl) to establish a secure communication channel between the client and the server. I believe I have two options now for secure data transfer between the client and the server. One option is to…
msvcyc
  • 2,569
  • 4
  • 24
  • 30