aes

Store 'sensitive' data in MySQL DB

爱⌒轻易说出口 提交于 2019-12-23 15:28:06
问题 How should 'sensitive' data be stored in MySQL Database? 1) Should I focus more on the security of the MySQL database and store the data as plain text? I found a step by step tutorial on how to make a MySQL database more secure: http://www.symantec.com/connect/articles/securing-mysql-step-step 2) Should I encrypt the data? If yes, then how should the encryption be done? Using MySQL aes_encrypt/aes_decrypt? Using PHP AES functions/algorithm for encrypting/decrypting data? How should the data

Generate AES key with seed value

一笑奈何 提交于 2019-12-23 15:04:10
问题 How do I Generate AES key with seed value so that whenever I generate key with same seed value,I shud be able to get the same AES key? I want to generate this key for my Blackberry Pearl 8100 device. I am not able to generate AES key with AESKey(keyData) . Also whenever I print it either in the form of String or byte[] , I am not able to generate it.(print it) Actual key is never printed. What can be done to get the key? Update I tried generating AESKey by passing byte[] of my data,as follws:

AES128 encoding in iOS4+

谁说我不能喝 提交于 2019-12-23 12:08:31
问题 I'm new to encrypting in iOS and i'm stuck with AES128 encryption. Is there some pre-built library (perhaps OpenSSL) which i can use easily? If so, how do I implement it and use it? Are there tutorials? I've found several "easy" tutorials how to build OpenSSL and import it to Xcode, but none of them worked for me. Also, it needs to be compatible with iOS4, so solution via CommonCrypto doesn't seem to be a solution (since several essential methods are only iOS 5+ compatible). Thanks for any

H2 database: how to protect with encryption, without exposing file encryption key

天涯浪子 提交于 2019-12-23 10:51:03
问题 We are using Java + H2 Database in server mode, because we do not want users from accessing database file. To add more protection to database file, we plan to use AES encryption (add CIPHER=AES to database URL) in case the storage is stolen. However, each user will also need to supply file protection password when connecting ([file password][space][user password]). Although users do not have access to database file, knowing the encryption key (file protection password) will make the

How to store AES encrypted information in MySQL database

拟墨画扇 提交于 2019-12-23 10:41:15
问题 I have a piece of information which is encoded using aes-256-cbc encryption. How should I store it in the database? Currently I'm using VARCHAR(255) utf8_bin. Is this OK or should I use other field type like VARBINARY(255)? Is there a possibility of losing some data using VARCHAR in this case? Thanks. 回答1: The possible (in)appropriateness of storing encrypted (as opposed to hashed) passwords in a database notwithstanding, AES ciphertext is binary data, and therefore should be stored as such,

How to store AES encrypted information in MySQL database

折月煮酒 提交于 2019-12-23 10:40:06
问题 I have a piece of information which is encoded using aes-256-cbc encryption. How should I store it in the database? Currently I'm using VARCHAR(255) utf8_bin. Is this OK or should I use other field type like VARBINARY(255)? Is there a possibility of losing some data using VARCHAR in this case? Thanks. 回答1: The possible (in)appropriateness of storing encrypted (as opposed to hashed) passwords in a database notwithstanding, AES ciphertext is binary data, and therefore should be stored as such,

How to decrypt data with Openssl tool encrypted with AES128 in iOS

霸气de小男生 提交于 2019-12-23 09:43:21
问题 I have many snippets of code, which encrypt the data with AES128 (If you provide your working implementation I will be very thankfull) For example this one: - (NSData*)AES128EncryptWithKey:(NSString*)key { // 'key' should be 16 bytes for AES128, will be null-padded otherwise char keyPtr[kCCKeySizeAES128 + 1]; // room for terminator (unused) bzero(keyPtr, sizeof(keyPtr)); // fill with zeroes (for padding) // fetch key data [key getCString:keyPtr maxLength:sizeof(keyPtr) encoding

How do I decrypt an AES256 bit cipher in golang that was encrypted in nodejs?

谁说我不能喝 提交于 2019-12-23 06:39:27
问题 I encrypted a string in Node.js like this. var cipher = crypto.createCipheriv( "aes256", "<A Buffer of length 32>", "79b67e539e7fcaefa7abf167de5c06ed" ); I noticed that a buffer in nodejs is like hex but every 2 consecutive characters are paired. So, It's length is half of whatever will come out if I convert it to a hex. Example: Buffer: <Buffer c3 80 36 f6 51 57 cb 6d b0 e8 fd 85 5a a2 8a da 07 4b e7 19 17 d1 c8 ee dc 2a e4 d8 5e 3c 9d a6> Hex:

How do I decrypt an AES256 bit cipher in golang that was encrypted in nodejs?

孤人 提交于 2019-12-23 06:37:05
问题 I encrypted a string in Node.js like this. var cipher = crypto.createCipheriv( "aes256", "<A Buffer of length 32>", "79b67e539e7fcaefa7abf167de5c06ed" ); I noticed that a buffer in nodejs is like hex but every 2 consecutive characters are paired. So, It's length is half of whatever will come out if I convert it to a hex. Example: Buffer: <Buffer c3 80 36 f6 51 57 cb 6d b0 e8 fd 85 5a a2 8a da 07 4b e7 19 17 d1 c8 ee dc 2a e4 d8 5e 3c 9d a6> Hex:

Decrypting AES cipher text using CryptoJS

試著忘記壹切 提交于 2019-12-23 06:06:08
问题 I am trying to follow the instructions seen in the image to complete mutual authentication between a bluetooth smartcard reader and a mobile application. Based on how I've interpreted the instructions, here is my attempt: const randomNumbers = 'd3be845b701b37eff9f24ea6108c0f99'; const masterKey = '41435231323535552d4a312041757468'; const d1 = CryptoJS.AES.decrypt( { ciphertext: CryptoJS.enc.Hex.parse(randomNumbers), }, CryptoJS.enc.Hex.parse(masterKey), { iv: CryptoJS.enc.Hex.parse(