encryption

Parallel simulation of AES in C using Openmp

一曲冷凌霜 提交于 2020-01-23 16:22:05
问题 Here is my problem. I want to parallelize AES-128 encryption in C using Openmp. I am hardly getting any speedup with the following code using openmp. My machine is Quadcore intel i5 machine. Here is the code. Any suggestion how to parallelize this code further would be really really appreciated. Please take a look at the main function which is at the end of the code. AES code below consists of a few functions to achieve its functionality. Please suggest how to best extract parallelism from

Parallel simulation of AES in C using Openmp

末鹿安然 提交于 2020-01-23 16:21:12
问题 Here is my problem. I want to parallelize AES-128 encryption in C using Openmp. I am hardly getting any speedup with the following code using openmp. My machine is Quadcore intel i5 machine. Here is the code. Any suggestion how to parallelize this code further would be really really appreciated. Please take a look at the main function which is at the end of the code. AES code below consists of a few functions to achieve its functionality. Please suggest how to best extract parallelism from

Error while trying to connect via SSH to remote host

≯℡__Kan透↙ 提交于 2020-01-23 12:51:59
问题 I'm trying to connect to a remote host to issue a command, but I'm getting the following error message while running the code: ssh: handshake failed: ssh: no common algorithm for key exchange; client offered: [curve25519-sha256@libssh.org ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1], server offered: [diffie-hellman-group1-sha1]panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr

How to decrypt a file in Objective C/IOS that is encrypted in php?

99封情书 提交于 2020-01-23 09:55:24
问题 I have googled too much for this error but found nothing useful. I am getting a file that is encrypted in php using the following code: mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $privateencryptkey, base64_encode(file), MCRYPT_MODE_CBC, $hardvector); I am unable to decrypt it in IOS. I had tried many libraries like NSDATA+CommonCrypto, NSFileManager-AES, NSDATA-aes but i have not got success in decrypting the file. Following is the objective-C code used: - (NSData *)AESDecryptWithPassphrase:

XTEA encryption in PHP and decryption in C

两盒软妹~` 提交于 2020-01-23 03:12:06
问题 I'm trying to establish communication between a website and an Arduino. I need to authenticate all the messages from my website to the Arduino, so I have found that the less time expensive way is using XTEA cryptography. My PHP code for the website is: mcrypt_encrypt(MCRYPT_XTEA, 'qwertyuiasdfghjk', 'asdfasdf', MCRYPT_MODE_ECB); where "qwertyuiasdfghjk" is a 128 bits key and "asdfasdf" is a 64 bits message. On the Arduino side I'm using: void _xtea_dec(void* dest, const void* v, const void* k

How to Generate and validate JWE in node js?

做~自己de王妃 提交于 2020-01-23 02:40:13
问题 I tried the bellow code to create RSA-OAEP and A128GCM JWE generator and validator. it works with node js , ie, encrypt claims and generate the jwe and decrypt the same gives me the claims. but it is not working with the other clients , like nimbusds jose, jose4j. So for a sure I am missing something. I am doing this by reading https://tools.ietf.org/html/rfc7516 index.js var crypto = require('crypto'); var randomstring = require("randomstring"); var ursa = require("ursa"); var fs = require(

Decrypting “SunJCE” AES encrypted data on Android

て烟熏妆下的殇ゞ 提交于 2020-01-22 13:11:30
问题 We need to write some Android code to decrypt some data sent from our server. Our server team gave us some sample decryption code which uses the "SunJCE" provider, which unfortunately doesn't exist on Android. Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding", "SunJCE"); Does anybody know the cleanest way to implement this on Android? If we try this on Android Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); then it looks like some unwanted garbage appears at the end of the

Pass list to AES key generator in PyCrypto

纵饮孤独 提交于 2020-01-22 03:20:11
问题 I'm attempting to generate an AES key with Pycrypto but receive the following error: TypeError: 'list' does not support the buffer interface for the following statement: aescipher = AES.new(mykey, AES.MODE_ECB) mykey , is of type list and contains [1885434739, 825373440, 0, 0] Does anyone know how I can convert mykey into the correct type for the AES.new function? 回答1: You should not supply any kind of list/array when creating an AES key. The raw key bytes are normally supplied using a byte

postgresql des encrypt

…衆ロ難τιáo~ 提交于 2020-01-22 03:03:04
问题 I have oracle database to move on to new postgresql server. Some tables are having field sesitive and those are all encryted through DBMS_OBFUSCATION_TOOLKIT.DESENCRYPT/DESDECRYPT. The problem is here. The size of postgresql's encrypted data size(bytea type) should be the same with oracle's. I tried to get it done with aes(encrypt/decrypt) which takes almost three times larger than raw data.(oracle takes 16byte with des algorithm, postgresql takes 33byte with aes and the raw data is of 13byte

Rails storing third party credentials.. Anyone know best practice?

陌路散爱 提交于 2020-01-21 21:53:25
问题 I've read a pile of other related questions... nothing really seems to answer the question I have. My application will integrate with several different third party sites. (ebay, paypal, google, amazon...) It is a product management system and it pushes products all over the place... Of course since it interacts with all these sites, it needs usernames, passwords, tokens.. ect.. Now I don't think it's really a good idea to store these things raw, but I still need to be able to get them raw, so