Newest 'encryption-symmetric' Questions

Q&A for professional and enthusiast programmers

Android Encryption using predefined symmetric key

Im currently creating an Android application that performs decryption on a certain string. The scenario of the app is: From a server (PHP), generate a symmetric key Insert manually the same secret ...

C# to Java DES encryption

Trying to create java class which will encrypt and decrypt as like C# code in below. Below is my code for C#, I need to convert it to Java. Can someone help me how to do it? I've been doing this for ...

Java 1.8 symmetric DESede encryption and decryption [duplicate]

I come with an issue related to JCE. Context SDK: JDK 1.8 OS: Ubuntu 14 I have been asked to implement a component for decrypt java.lang.String. The encrypted string is part of webservice response ...

CryptEncrypt function encrypting data which corrupts on writing into a file.

For encryption, I use "CryptEncrypt" and for decryption I use the "CryptDecrypt". MSDN link: https://msdn.microsoft.com/en-us/library/windows/desktop/aa379924(v=vs.85).aspx When I encrypt the ...

Encryption Decryption AES/ECB/NoPadding

is there any method de encrypt/decrypt a string in iOS following this algorithm ? all i know that in java this class : javax.crypto.Cipher is used for this purpose

A more secure symmetric encryption key vs. assymetric key

What are the advantages of having a symmetric encryption algorithm with a lower probabilty of key retrieval than the asymmetric encryption used for transferal of symmetric key? I can see how it ...

Decrypting byte array with SymmetricAlgorithm and CryptoStream

My encrypting and decrypting methods: private static SymmetricAlgorithm GetAlgorithm(string password) { using (Rijndael algorithm = Rijndael.Create()) { using (Rfc2898DeriveBytes rdb =...

Getting BadPaddingException while doing a Sqoop import with encrypted password file

I encrypt file with openssl then put it on HDFS, I used AES/ECB, 128 bits and salt option, and with some research I find out openssl uses PKCS5 padding as default which are all defaults in ...

How to get decrypted key from org.jose4j.jwe.JsonWebEncryption object?

We set the JsonWebEncryption values at the sender's end. 'rsk' is the 32 byte Random Symmetric Key that is used to encrypt the 'message'. In turn 'rsk' itself is encrypted by public key. byte[...

Securing symmetric key

In my project (windows desktop application) I use symmetric key in order to encrypt/decrypt some configurations that need to be protected. The key is hardcoded in my code (C++). What are the risks ...

DES encryption using native java classes [duplicate]

Trying to create java class which will encrypt and decrypt as like C# code in below. Below is the code for C#, I need to convert it to Java. Can someone help me how to do it? I've been doing this ...

encrypt a Hash with Symmetric Encryption gem

i want to encrypt a hash that is being allowed on a Mongodb i use Mongoid, symmetric-encryption and mongoid-encrypted-fields gems cause i read that have support for Mongoid and ActiveRecord cause i ...

the result of ECB Encryption is maybe different. it is same as the result of CBC

public class Symmetric1 { /** * @param args the command line arguments */ public static void main(String[] args) throws Exception{ // TODO code application logic here ...

s-box for symmetric and asymmetric cryptography

I am researching about cryptography and found out that there are s-box in symmetric cryptography. However, I do not see common-used asymmetric cryptography use s-box. Is there any famous or popular ...

How to generate a AES-256 CBC key/iv that can be shared as a string?

I am trying to make AES-256 CBC encryption work in PHP, Ruby (using SymmetricEncryption) and Javascript (using CryptoJS). As for the first 2: <?php openssl_encrypt( 'Hello!', 'aes-256-cbc', '...

How to encrypt nvarchar column in oracle?

I have a table containing nvarchar datatype columns (contains text in different languages). I want to encrypt data before inserting into table and decrypt the same while fetching records. Please ...

How To Code A BlackBox in Python Using Homomorphic or…?

I need a "blackbox" coded in Python... ...Meaning, code that receives unencrypted inputs, runs those inputs through an encrypted algorithm, then sends out unencrypted outputs. I just ran across this:...

Java - Vignere Cipher doing something wrong

I attempted writing an method which takes an array of characters from the main and then returns a character array of the encrypted/decrypted characters. When I apply the method twice to a given char ...

Setting AES cipher mode for ASP.NET MachineKey from web.config

I try using ASP.NET FormAuthentication for my website authentication. I added machineKey element in my web.config so that I can choose what validation and decryption algorithms to use for my ...

Can we use the key as the IV for AES?

I wish to be more efficient in generating a random key and a random IV for the encryption. But is it workable and safe to use the random key as the IV?

“unknown: this object doesn't support multiple channels” during encryption

I am getting "unknown: this object doesn't support multiple channels" exception during file encryption. I am able to generate session key but it can not be used to encrypt file. The following is my ...

nodejs aes256 encrypt is different from online aes256 encryption tool

I encrypted word HelloWorld using nodejs-aes256 https://www.npmjs.com/package/nodejs-aes256 with key apple the output was 1ivBqj+nVPcHvZjQlx7Di0SoxV49bNpWtog= then I encrypted same word with same key ...

Key export laws across different countries

I have this problem with my key managers and key management best practices. Can I encrypt data in one country while keeping/storing the keys in a different one. Are there any restrictions/regulations ...

ASKE(Alpha Secure Key Establishment) in Zigbee

I am working on zigbee security. For key establishment, some approaches are given in zigbee. Some of them are ASKE(Alpha Secure Key Establishment), ASAC(Alpha Secure Access Control), SKKE(Symmetric ...

How to Secure Private key(of Triple DES) in C# application?

Tool : OS-Windows 7 64bit, Visual Studio 2012, 4.5 .NET Framework. Language : C#. I have created one console application. In this application I have used Data Encryption Algorithm (DES- Symmetric ...

Mifare Desfire symmetric authentication with master key on android

I wanted to use the Mifare Desfire chip for product authentication purposes, where the chip would be embedded into products. As such, I am looking for a NFC solution that makes it virtually impossible(...

Indentify encrypted string get from iphone tweak

I am trying to decrypt a string which i got from iphone tweak. But i have some problem when trying to decrypt it with RNCryptor ( i think the client use this to encrypt the string) but when i try to ...

Hybrid cryptosystem implementation in .net. Error Specified key is not a valid size for this algorithm

I am trying to implement hybrid cryptosystem as mentioned in https://en.wikipedia.org/wiki/Hybrid_cryptosystem At the moment I have implemented following algorithm private void button1_Click(object ...

Encryption of Database Id

I was working on developing a RESTful service where the Id of a particular table in the database needs to be returned to the client for future access to the particular entry in the database. I was ...

S-box in AES CCM 128 bit

I am working on encryption & decryption of data using AES-CCM. While studying AES, I came across a word called S-Box. What is S-Box, and the relationship with AES? How can it be calculated? Is ...

Web form submission : Client-side encryption and source code not accessible

I'm not really experienced in website and specially website security. Before the problem, let's explain the context : I have created a web page that is meant to be a platform with an order form X to ...

symmetric encryption in c# resembles JAVA

private static byte[] encryptData(ByteArrayOutputStream data, byte[] symmetricKey) throws EncryptionException { try { SecretKey secKey = new SecretKeySpec(symmetricKey, "AES"); ...

What is the proper way to handle key derivation on Android with libsodium?

I am trying to use libsodium for symmetric encryption on Android. In order to get libsodium on android, I am using this binding library. I am struggling to find the proper way to derive a key from a (...

javax.crypto.Cipher equivalent code in Nodejs Crypto Javascript

I'm trying to convert below java code into nodejs. public static String encrypt(String accessToken) throws Exception { Cipher cipher = Cipher.getInstance("AES"); String merchantKey = "...

Secure connection between client and server application

I know there are many question regarding this topic, but I swear I could not find the answer that best fits my problem. It's a conceptual issue. I have a client and a server application and they must ...

How to send data in secure way between client and server using only Symmetric cryptography

I'd take the following steps to send/received data between client and server. But I'm not sure if all the steps are secure enough and impossible to intercept. Please can you let me know how to patch ...

AES 256 program not working [closed]

So I have been attempting to implement AES-256 in C. After lots of reading around and following the wikipedia page to implement it, I managed to code it. Only when I tested it, it seemed to give the ...

EVP_DecryptFinal_ex Error - Large arrays

I'm trying to decript some large strings encrypted with AES CBC 256 in OpenSSL, but when i call the method EVP_DecryptFinal_ex with large arrays, more than 3000 positions, the method returns 0. If i ...

How to encode Permutation of Substitution

I want to substitute from cypher text to plain text. But there can be n! possibilities where n is the number of characters for example cypher: [ a, b, c, d ] plain : [ x, y, z, m ] Let's say that ...
+50

AES encryption on iOS and android, output and buffer size is different

Implementing AES256 on iOS using CCCrypt function. But output and output buffer length is different than Android. Cipher class in Android produces 48 bytes data where in iOS we get 80 bytes data. ...

C# AesManaged to PCLCrypto

I tried to decrypt string that is encrypted using .NET AesManaged. Here is the .NET decrypt code: public static string Decrypt(byte[] data, string pwd, byte[] salt) { using (Aes aes = new ...

Encrypting data which we want to correlate later

I want to encrypt some sensitive information (no more than 30 bytes) with a private key so that it cannot be reversed by random person. But it should be correlatable E.g if I have for example string “...

Is there any difference between AES_128_CBC and AES_128_CBC_SHA algorithm?

Is there any difference between AES_128_CBC and AES_128_CBC_SHA algorithm? I have a client document which says AES_128_CBC_SHA algorithm for data encryption. could anybody can share some Library files ...

PHP & Mysql -Queries using symmetric key decryption

I am attempting to use PHP to execute an SQL query which uses symmetric key decryption. However I am unable to get any results. My PHP code looks like this: $sql = "OPEN SYMMETRIC KEY ServerKey ...

HTTPS uses Asymmetric or Symmetric encryption?

I have searched all this morning but I've found websites where it is said that data is sent through an asymmetric encryption using the TLS protocol Then I found the contrary Please can you tell me ...

Crypto in Linux

I understand that in Linux kernel there are basically, 2 types of crypto options: cryptodev (/dev/crypto) AF_ALG But in documentation, both methods are mentioned as HW encryption , i.e. methods ...

Hybrid cryptography. Length of the data to decrypt is invalid

I am getting above mentioned error during a hybrid cryptography implementation. as per https://en.wikipedia.org/wiki/Hybrid_cryptosystem I am just stucked at the last step My code is private ...

max plaintext size for Android Keystore symmetric encryption?

I'd like to use the Android Keystore to do symmetric AES encryption of large (multi MB) data files. I've written demo code that will encrypt/decrypt multi-KB files with the Keystore, but when the ...

What is the length in bytes of AesCryptoServiceProvider GenerateIV()?

AesCryptoServiceProvider aesAlg = new AesCryptoServiceProvider() var iv = aesAlg.GenerateIV(); Do you know what the length of iv? Is it fixed with byte[16]? Another question is: what is the length ...
Translating... 0%