aes

iPhone - AES256 Encryption Using Built In Library

青春壹個敷衍的年華 提交于 2019-12-10 12:20:39
问题 Hey all, I am using http://pastie.org/966473 as a reference as all I need to do is encrypt something using AES256 encrypting. I created a class and put the implementation in the pastie on top of the implementation for my class. @implementation //pastie code @end @implementation //my class code @end In my class code I create a NSMutableData and try to call the EncryptAES method and I get a warning saying it might not respond to that. What am I doing wrong here? do I need to implement the

Security using AES with salted password as key

别等时光非礼了梦想. 提交于 2019-12-10 12:09:12
问题 I understand how a salted hash of a password works, but I am assuming I would also need to store the salt, username, KEY, and encryptedpassword. I think overall I just need to understand how I would implement this for instance how to store it and then how to regenerate the password. Also if someone could explain why using this salted value is better, couldn't a person do a dictionary attack with the salt in front of each word? Thanks, 回答1: It is unclear what you are trying to do: verify a

Encrypt with Node.js AES CTR and decrypt with PyCrypto

末鹿安然 提交于 2019-12-10 11:46:30
问题 Okay, so basically I am having issues decrypting with Python. I've managed to encrypt/decrypt data with Node.js - using "aes-128-ctr", the same goes for PyCrypto, but when I try to encrypt with Node.js and decrypt with Python I get invalid deciphered text. Node.js code: var key = "1234567890123456"; var cipher = crypto.createCipher("aes-128-ctr",key) var ctext = cipher.update('asasasa','utf8','hex') + cipher.final('hex') console.log(ctext) // outputs: "f2cf6ecd8f" Python code: counter =

How to send NSData as key and IV for CCCrypt

你说的曾经没有我的故事 提交于 2019-12-10 11:41:40
问题 I need to AES128 encrypt a 16 byte block of data using a key and an IV to a 16 byte AES block. Every CCCrypt example I've seen takes in (NSString *) for key and IV. My Key and IV are NSData 16 bytes. I've converted the NSData into hex strings but the result is not correct. I get an AES block of 32 bytes when I do it that way. So my question is, what do I have to do to get NSData to be read into CCCrypt as a const void * ? - (NSData *)AES128Operation:(CCOperation)operation key:(NSString *)key

AES Encryption Golang and Python

坚强是说给别人听的谎言 提交于 2019-12-10 11:06:28
问题 I am working on a fun side project for myself. A golang server and a python client. I want data transmitted to be encrypted but cant seem to get the two encryption schemes working together. I am a novice when it comes to encryption so please explain like you are talking to a toddler. Here is my golang encryption functions: import ( "crypto/aes" "crypto/cipher" "crypto/rand" "errors" "io" "fmt" ) func Encrypt(key, text []byte) (ciphertext []byte, err error) { var block cipher.Block if block,

Which hardware chip/vendor does Apple use for its hardware-accelerated AES/SHA-1 encryption?

最后都变了- 提交于 2019-12-10 10:25:50
问题 This is a follow-up of sorts to my question: Does iPhone support hardware-accelerated AES Encryption?. After further analysis and hackery, I have determined that the iOS CommonCrypto supports hardware acceleration only for the AES-CBC mode (Cipher Block Chaining), but not AES-CTR (Counter) or AES-ECB (Electronic Codebook) modes. Although this differs from the open sourced code: http://opensource.apple.com/source/CommonCrypto/CommonCrypto-36064/Source/GladmanAES/ccNewGladman.c. So this seems

AES Encrypting a Microsoft Access Field Via VBA

痞子三分冷 提交于 2019-12-10 10:19:37
问题 I need to create a Microsoft Access database, but have a need, in one of my tables, for a single field to be strongly encrypted. Since AES requires both a key and an initialization vector, I've decided to solve this problem by requiring a password to access the database (as the key), and a field in the table to hold a SHA1 hash of the plaintext of the encrypted field. Does anyone know where I can find VBA-compatible code to actually do the encryption? 回答1: Some alternatives to writing it from

Mapping OpenSSL command line AES encryption to NodeJS Crypto API equivalent

筅森魡賤 提交于 2019-12-10 10:19:00
问题 In trying to understand the Node.js Crypto API, I have been trying to match code to the equivalent OpenSSL enc command line (line breaks inserted for readability) which is piped through xxd for hex display. $ echo -n "The quick brown fox jumps over the lazy dog" | openssl enc -aes256 -e -K "a891f95cc50bd872e8fcd96cf5030535e273c5210570b3dcfa7946873d167c57" -iv "3bbdce68b2736ed96972d56865ad82a2" | xxd -p -c 64

Extremely slow built-in AES encryption with Java

霸气de小男生 提交于 2019-12-10 10:16:22
问题 I have a lot of very small data (19 Bytes) that need to be encrypted and sent to a remote server via tcp in encrypted format. I am using the code below to do this. package aesclient; import java.io.OutputStream; import java.net.Socket; import java.security.SecureRandom; import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; public class AESClient { static byte[] plaintext = new byte[] {0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,

Unable to decrypt AES's ciphertext of php code in blackberry

馋奶兔 提交于 2019-12-10 00:43:06
问题 i m writing one application which encrypt and decrypt data using AES (ECB) mode. Encrypted data of blackberry code successfully decrypt by php code. but problem is that when i get encrypted text from php i m not able to decrypt it with blackberry code..even i m not getting any exception. here is my code to encrypt and decrypt text. public static byte[] encrypt( byte[] keyData, byte[] data ) throws CryptoException, IOException { // Create the AES key to use for encrypting the data. // This