Newest 'encryption-symmetric' Questions

Q&A for professional and enthusiast programmers

How to encrypt a file using Crypto API with multiple threads?

I am trying to encrypt a file using multiple threads and Crypto API / AES256 / CBC mode / NO IV (initialization vector) is used. I am dividing the file into as many number of threads. The thread ...

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 ...

Number of private and public keys needed?

A question came up in my networks & security course this semester, and I've been confused about how to answer it. What is the correct number of keys? Suppose N people want to communicate with N-...

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 = "...

“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 ...

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 “...

I am using sample app of Exoplayer, I am getting error Failed to handle key response: Drm Vendor defined error

I have installed the sample app given in exoplayer, I tried to play a widevine sample on given below device(Configuration are mentioned below). And got the above log. (Error Log : com.google....

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', '...

Empty or null array using System.Security.Cryptography

I'm trying to use the AES encryption method in C# using this code: public static byte[] encryptData(string plaintext) { Aes myAes = Aes.Create(); byte[] encrypted = ...

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 ...

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 ...

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 ...

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 ...

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 ...

symmetric encryption in c# resembles JAVA

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

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 ...

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:...

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 ...

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 ...

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 ...

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 ...

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(...

openssl password decryption using Python

I'm using the following PHP code to encrypt a password and then saving it into a database, I need to be able to decrypt it using Python. I am successful in decrypting it using PHP but unable to find ...

Backup and restore certificate with symmetric key

I ran the following queries on my Dev database: CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'password' CREATE CERTIFICATE cert WITH SUBJECT = 'subj' CREATE SYMMETRIC KEY symKey WITH ALGORITHM = ...

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 ...

How to encrypt Neo4j Database

I would like to encrypt Neo4j Database, so what I am doing, I used Eclipse to create the Neo4j database {Java API}, and I used AES 128-bit key, to encrypt the nodes' properties, How can I replace ...

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 ...

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 ...

CipherOutputStream corrupting headers in Android

I'm using a simple CipherInput/OutputStream to try to encrypt/decrypt files in android. The problem I'm having is that it seems to be corrupting the first few bytes of the file but not the rest. ...

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?

Bitwise Operations on type byte vs byte[] [duplicate]

Here is the bit of code I'm working with: byte[] encodedBytes1 = null; byte[] encodedBytes2 = null; try { Cipher c = Cipher.getInstance(encryptationMode); c.init(Cipher.ENCRYPT_MODE, key); ...

How to use local alphabetical order number instead of ascii

How can I use alphabetical order during encryption instead of ascii table numbers? For example, if I want to use one time pad encryption (text+key)modulo26, it seems to be taking ASCII number. I tried ...

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

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 ...

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[...

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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

EVP_DecryptFinal_ex:bad decrypt, possible key generation issue in Android

So I'm having issues with generating a key from a string-based passphrase. The encryption step works fine and the decryption step works up until the error listed at the bottom, leaving the decrypted ...

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 ...

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 ...

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 ...

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 ...
Translating... 0%