aes

Ruby OpenSSL AES-128-CTR

我们两清 提交于 2019-12-12 06:18:37
问题 I can't figure out what I am doing wrong here trying to decrypt a string of hex values with a given key using ruby's OpenSSL cipher AES-128-CTR. I am using the gem hex_string to convert my hex to bytes ctrkey = "36f18357be4dbd77f050515c73fcf9f2" ciphertext3 = "69dda8455c7dd4254bf353b773304eec0ec7702330098ce7f7520d1cbbb20fc3\ 88d1b0adb5054dbd7370849dbf0b88d393f252e764f1f5f7ad97ef79d59ce29f5f51eeca32eabedd9afa9329" cipher2 = OpenSSL::Cipher.new('AES-128-CTR') cipher2.decrypt ctrkey = ctrkey.to

AES, Serpent or Twofish in C example?

北城以北 提交于 2019-12-12 06:15:27
问题 I found a lot of implementations of AES, Twofish and Serpent in C. But I don't really understand the examples. I only understand that some where provided with examples to invert a matrix. Can someone point me to an example or .c file for to encrypt/decrypt data represented by a char* and a password? 回答1: The wikipedia article actually links to an excellent tutorial (by X-N20) written in C that walks you through the Maths and provides C implementations on the go, which is quite useful for

nodejs aes256 encrypt is different from online aes256 encryption tool

♀尐吖头ヾ 提交于 2019-12-12 05:48:15
问题 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 using online tool http://aesencryption.net/ the output was LIxrc1buLeLLr9nJxtPhjHSYFVaceqsXiFamWiVWzYI= Whey are they different? 回答1: First, "apple" can't be a key for AES-256. It's not long enough. An AES-256 key has to be exactly 256 bits (32 bytes). "apple" is, in the likely ways of encoding

Detecting AES-NI CPU instructions

馋奶兔 提交于 2019-12-12 05:38:10
问题 Recent Intel and AMD CPUs support specific AES instructions that increase the performance of encryption and decryption. Is it possible to to detect when these instructions are called? For example by writing a kernel module that monitors the instructions that are sent to the CPU? Or is the kernel still to high-level? 回答1: My understanding is that instructions like AESENC require no special privileges, so you won't be able to trap them with one of the usual fault handlers even in the kernel.

video encryption using aes

依然范特西╮ 提交于 2019-12-12 05:27:40
问题 This code works for smaller files even mp3 and around 50mb video files but it gives me error saying out of memory when it try to encrypt larger video files(>1gb) in c# win application AES algorithm: public byte[] AES_Encrypt(byte[] bytesToBeEncrypted, byte[] passwordBytes) { byte[] encryptedBytes = null; byte[] saltBytes = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 }; using (MemoryStream ms = new MemoryStream()) { using (RijndaelManaged AES = new RijndaelManaged()) { AES.KeySize = 256; AES.BlockSize

Openssl EVP encryption and decryption from a file

戏子无情 提交于 2019-12-12 05:18:37
问题 Here is a sample code for encryption and decrption using openssl EVP. when i perform both encryption and decryption it seems to work fine. When i write the encryted string in file and decript from file i am getting error encrypt.c #include <openssl/conf.h> #include <openssl/evp.h> #include <openssl/err.h> #include <openssl/bio.h> #include <string.h> #include <iostream> #include <fstream> #include <stdint.h> #include <assert.h> void handleErrors(void) { ERR_print_errors_fp(stderr); abort(); }

AES key finding from encrypted and plaintext data

本小妞迷上赌 提交于 2019-12-12 04:39:28
问题 If I have a plaintext message M along with its encrypted equivalent E, and I know that it has been encrypted with a 256-bit AES key, is there a way to work out the key? Are there ways to do it, if M is long enough? 回答1: In theory yes. In reality no. You'll need either to have software running on the same machine that is performing the encryption and attack the system through cache analysis: "In April 2005, D.J. Bernstein announced a cache-timing attack that he used to break a custom server

How to unzip an AES encrypted zip file on the iPhone?

岁酱吖の 提交于 2019-12-12 03:55:18
问题 In my current iPhone project I need to decrypt zip files which have been encrypted using AES 256 method either on a Mac with StuffIt Engine or on Windows with WinZip. I tried to use ZipArchive (based on MiniZip) but it doesn't work. Anyone knows how to do this ? 回答1: Added AES encryption support to Minizip contrib: https://github.com/nmoinvaz/minizip 回答2: I ended up buying a license for IPWorks ZIP library which works fine. 回答3: You should try to port (include) InfoZip sources, they are

OpenPGP Encryption Using BouncyCastle Lightweight API

前提是你 提交于 2019-12-12 03:52:52
问题 I have to encrypt some content using a 256 bit AES-CBC key. The encryption protocol to be followed is OpenPGP. Since the key size is 256 bit and the public/private keys will also be of 4096 bit I will have to use the lightweight APIs. I have found several questions that show how to encrypt using a 256 bit AES-CBC key but I cannot figure out how to integrate that with PGP. The most obvious approach is to encrypt it using the AES engine and then encrypt the result using the public key as it is

Sagepay 2.22 to 3.00 form upgrade - PHP update to AES encryption

谁说胖子不能爱 提交于 2019-12-12 03:35:07
问题 I've been trying with no avail to understand how to upgrade the encryption used in the code for my company's three ecommerce sites from simpleXor to an AES encryption. Without doing this, I cannot upgrade the rest of the code which means after July we won't be able to take any payments online. I've managed to update the crypt form codes in line with the upgrade to 3.00. I can identify the encryption code and have looked through the form integration demo download for PHP from Sagepay but can't