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

Best way to search encrypted data inside MySQL

I am encrypting using PHP before saving the encrypted data to MySQL. I am convinced this is a better way in the long run vs using MySQL's AES_* functions. My question now is, is there an efficient way to search encrypted data aside from storing a…
IMB
  • 15,163
  • 19
  • 82
  • 140
5
votes
1 answer

Does Azure's Key Vault support symmetric key encryption?

I would appreciate clarification and advice on the following: My project requires me to use symmetric data encryption (using AES), in a Nodejs environment, to secure data on a database (mongodb). Ideally, I would like to do this as follows: Store…
ryd3r
  • 283
  • 4
  • 14
5
votes
3 answers

Fast, simple to use symmetric cipher for integer encryption in Java

What is in Java a cipher function for integer encryption having these properties?: Fast Symmetric-key algorithm Simple to use (i.e. a couple of lines of code to use it and no external library to include) It is possible to specify the output length…
Andrea
  • 15,900
  • 18
  • 65
  • 84
5
votes
1 answer

How To Decrypt AWS Ruby Client-side Encryption in Python

AWS's S3 SDK for Ruby allows for client-side ('envelope') encryption of the file. It's a combination of AES CBC/ECB encryption for the client-side key where the envelope key and initialization vector are stored in the metadata. I have a Ruby…
lycovian
  • 343
  • 1
  • 9
5
votes
3 answers

Python AES implementations difference

I'm comparing AES implementations in Python from the pycrypto and the cryptography.io library. from cryptography.hazmat.primitives.ciphers import Cipher, modes, algorithms from cryptography.hazmat.backends import default_backend #…
marczellm
  • 1,224
  • 2
  • 18
  • 42
5
votes
2 answers

How to write encrypted data to a text file?

I have a project where we write a small amount of data to a file every 5 minutes. The idea is to look at how this data changes over a period of hours, days, and weeks. One of the requirements is to store this data in a secure format. We already…
Kyte
  • 834
  • 2
  • 12
  • 27
5
votes
3 answers

Can Derby / JavaDB _really_ encrypt with Triple DES rather than (plain) DES?

It seems to be confusing Triple-DES (>128bit) with plain DES (64bit). I'm trying to encrypt a Derby database with Triple DES (or DESede) using Java 1.5 I found this discussion forum message about a problem with JDK 1.5 by chance and so checked to…
sventechie
  • 1,859
  • 1
  • 22
  • 51
4
votes
2 answers

How do I set hard-coded symmetric encryption in WCF using AES256?

How do I define channel security in WCF to encrypted messages using by a hard-coded symmetric key with AES256 standard? I do not want to use certificates and I am aware that this is a "weak" security practice.
dux2
  • 1,770
  • 1
  • 21
  • 27
4
votes
1 answer

SSL + Additional Layer of Encryption

I'm wondering what to do in the case of a customer asking for a second layer of encryption on top of SSL? For example, I have an SSL tunnel, and the customer wants me to then use symmetric key encryption on data flowing through that tunnel. The…
4
votes
1 answer

Delphi 7 - DCPCrypt - TDCP_rijndael - DecryptString - How to make it work?

I'm encrypting text in PHP (openssl_encrypt / 'aes-256-cbc') and then trying to decrypt it in Delphi 7 (DCPCrypt / TDCP_rijndael). The PHP script file is saved with ANSI encoding, in the hope that the string transmitted (its a REST API web service)…
Steve F
  • 1,527
  • 1
  • 29
  • 55
4
votes
1 answer

What is wrong in my RC6 implmentation?

can anyone see where i made a mistake here? I know that the algorithm will properly decrypt the encrypted data. however, most of the encrypted data is not the correct output, according to the RC6 paper. // hexlify(string) turns a string into its…
calccrypto
  • 8,583
  • 21
  • 68
  • 99
4
votes
2 answers

Encryption using Javascript without sacrificing performance

I would like to enhance my web application by including symmetric encryption techniques using Javascript but I fear that I will lose the performance. Can you suggest me some good approaches please?
4
votes
1 answer

Need help understanding this '||' operation in AES encryption

I have never gone really deep into encryption algorithms till date but now I have been put on a project which demands some knowledge on it. I am using AES-CTR algo and really need to understand what '||' this operation means. For example: I have the…
codemania23
  • 913
  • 11
  • 19
4
votes
1 answer

Trying to decrypt a string using openssl/golang which has been encrypted in rails

I am trying to decrypt a string which has been encrypted in my rails project. This is how I am encrypting the data: def encrypt_text(text_To_encrypt) # 0. generate the key using command openssl rand -hex 16 on linux machines # 1.…
defiant
  • 3,161
  • 11
  • 41
  • 65
4
votes
1 answer

Using Rfc2898DeriveBytes Class to obtain Key and IV

I am just becoming familiar with encryption and the .NET framework. After looking at many examples I am seeing a repeated pattern that confuses when using the .NET Class Rfc2898DeriveBytes. When using this class to obtain an encryption key and an…
webworm
  • 10,587
  • 33
  • 120
  • 217