aes

How do I get Rust's openssl crate to decrypt data from the symmetric-encryption gem without the gibberish that Node Crypto automatically removes?

纵饮孤独 提交于 2019-12-12 14:29:06
问题 I'm decrypting legacy data created by a Ruby on Rails application using the symmetric-encryption gem in Rust. See my earlier question How do I decrypt data encrypted by Ruby's `symmetric-encryption` gem in another language?. I've already implemented this in Node where the crypto library seems to know how to strip out gibberish in an encrypted string that Rust's openssl crate isn't stripping out (at least, the way I'm using it). I have already stripped out the PKCS7 padding and a header, yet

How do I select/enforce AES encryption with aspnet_regiis to encrypt web.config values?

偶尔善良 提交于 2019-12-12 14:14:05
问题 I need to encrypt part of our web.config for our ASP.Net 4.0 project, but we are required to use AES and the default appears to be Triple DES. How can I tell it to use AES encryption instead? In the command prompt I do the following commands: aspnet_regiis -pc "NetFrameworkConfigurationKey" -exp aspnet_regiis -pe "connectionStrings" -app "/<myapp>" I figure I set the encryption method to AES by selecting the appropriate CSP (-csp) but I haven't been able to find or figure out the name of the

Implementation of AES in assembly [closed]

感情迁移 提交于 2019-12-12 13:05:08
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . Hello Everyone I am trying to build a code to do demonstrate doing AES encryption in assembly. the latest Intel manual has AESENC xmm1,xmm2/m128 —Perform One Round of an AES Encryption Flow round key from the

Java AES decryption detect incorrect key

江枫思渺然 提交于 2019-12-12 12:29:32
问题 I am writing android app that makes AES encryption/decryption of files. I want to be able to detect if incorrect password is specified and thus not matching key is derived for decryption. I am using AES/CBC/PKCS7Padding with 256 bit key. If I do cipher.doFinal() I can try/catch the BadPaddingException and it tells me that something is wrong and probably key was incorrect. But if I use CipherInputStream to read encrypted file, I get no feedback on correctness of padding. So if I deliberately

BadPadding exception when trying to decrypt AES based encrypted text

非 Y 不嫁゛ 提交于 2019-12-12 12:20:18
问题 Problem Scenario: I am creating an encrypted file using OpenSSL AES-256-CBC mode in Ubuntu. openssl aes-256-cbc -a -in avengers.txt -out avengers.enc test test File Content: avengersAssemble avengers.enc file content: U2FsdGVkX194TyUFrb4gOn86XYaKjKP98YdOlQDJz+t/76mvVmNKl+NyKKUnYwYH To Decrypt: openssl aes-256-cbc -a -d -in avengers.enc Now I want to decrypt this encrypted file avengers.enc using java code i.e., I just store this file content and password (in this case test) to decrypt it. My

Android AES in C

二次信任 提交于 2019-12-12 11:17:09
问题 I wanna encrypt my files on PC(Windows 7, 64bit) and decrypt 'em on Android. I use this algo to encrypt files. http://gladman.plushost.co.uk/oldsite/AES/aes-byte-29-08-08.zip I encrypt my files on PC, push them to SDcard. Unfortunately when I try to decrypt them on Android, the result is different, files are completely unreadable...! What's wrong with my code? jbyteArray Java_com_example_hellojni_HelloJni_decrypt(JNIEnv* env, jobject thiz, jstring fileName) { ...... /* read the file into the

What are the correct settings for crypto.pbkdf2 to derive IV and key to crypto.createCipheriv?

和自甴很熟 提交于 2019-12-12 10:48:53
问题 In an application in node.js, I am using crypto module for symmetric encryption/decryption. I am using AES-256-CTR. I originally assumed the crypto.createCipher will be "just working" and "handwaved" the details. Now I am reading in the documentation: Note: createCipher derives keys with the OpenSSL function EVP_BytesToKey with the digest algorithm set to MD5, one iteration, and no salt. The lack of salt allows dictionary attacks as the same password always creates the same key. The low

Unable to decrypt aes ciphertext with slowaes (javascript)

£可爱£侵袭症+ 提交于 2019-12-12 09:47:16
问题 I have a cipher text I encoded with the AesManaged .Net classes. plaintext: "string" password: "password" this is the c# code I use to encrypt: private AesManaged AESCipher; private String Password; public AES(String Password) { this.AESCipher = new AesManaged(); this.AESCipher.Mode = CipherMode.CBC; this.AESCipher.Padding = PaddingMode.PKCS7; this.AESCipher.IV = HexStringToByteArray("000102030405060708090A0B0C0D0E0F"); this.AESCipher.KeySize = 256; this.AESCipher.BlockSize = 128; this

PBEWITHSHA256AND128BITAES-CBC-BC creating java.security.NoSuchAlgorithmException on RedHat 6.4

给你一囗甜甜゛ 提交于 2019-12-12 09:36:50
问题 We have an application that uses Bouncy Castle to encrypt data using PBEWITHSHA256AND128BITAES-CBC-BC algorithm. It works fine on Ubuntu running OpenJDK 1.7 . But when when we move it to RedHat 6.4 also running OpenJDK 1.7 , we get the following exception: java.security.NoSuchAlgorithmException Any thoughts on what could be causing this. How can we add PBEWITHSHA256AND128BITAES-CBC-BC algorithm to RedHat 6.4 ? p.s. the application is running in JBoss . private String cryptoAlgorithm =

AES encryption in java [duplicate]

旧时模样 提交于 2019-12-12 09:26:27
问题 This question already has answers here : What is a NullPointerException, and how do I fix it? (12 answers) Closed 4 years ago . I have a program that encrypts and decrypts using the AES algorithm, but I have to specify the name of the encrypted file, and also specify the format of the original file as part of the name of the encrypted file. I will like to know how how to implement the following features into my code: I want the name of the encrypted file to be in cipherText I want the