Newest 'encryption-symmetric' Questions

Q&A for professional and enthusiast programmers

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

How or What is the best way to pass an encryption key?

Ok. so, encrypted data is sent from the computer to the server and spread to other computers. And, let say there is a person in the middle attack? Here is where I'm confuse; The client/server need ...

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

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

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

No supported encrypter found. The cipher and / or key length are invalid potential bug?

If I SPAM F5 eventually I will get "RuntimeException in EncryptionServiceProvider.php line 45: No supported encrypter found. The cipher and / or key length are invalid." But then it will disappear ...

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

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

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

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

Android encryption/decryption [closed]

I am trying to use RSA encryption: My goal is 1) Create private and public key 2) Save it to keystore 3) get keys by alias and start encrypt and encrypt. I tried KeyGenParameterSpec.Builder but it is ...

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

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

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

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

symmetric encryption in c# resembles JAVA

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

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

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

Decrypting string encrypted in C# with RijndaelManaged class using PHP

Here's some C# code (I've modified it slightly to modify some of the hard coded values in it): public static string Decrypt(string InputFile) { string outstr = null; if ((InputFile != null)) ...

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

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

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

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

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

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

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

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

Warning: mcrypt_encrypt(): key of size 10 not supported by this algorithm. only key of size 16, 24 or 32 supported

I am trying to encrypt a password using mcrypt_encrypt(). It is working fine on localhost, but when goes to online, my output is "" and I'm getting this warning: Warning: mcrypt_encrypt(): Key of ...

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

Creating an Encryption Function using Crypto++ [closed]

The following code is used for encrypting and encrypting a textual data stored in the string "plain" using the AES with CBC, and it measures the CPU ticks elapsed during the encryption/decryption ...

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

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

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

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

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

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

(C language) Garbled decryption in AES-CTR based encryption decryption tool

The decryption and encryption code (included below) may be possibly wrong. They're compiling error free, however, the decrypted file is not same as the plaintext file. It is garbled. I am trying to ...

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

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

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

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

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

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

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

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

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