rijndael

Is Asp.net identity hashing Secured?

孤街浪徒 提交于 2019-12-08 11:44:49
问题 I have referred the following sites for the Rijndael and Asp.net hashing implementations in the following url. Rijndael - How to generate Rijndael KEY and IV using a passphrase? Asp.net hashing - ASP.NET Identity default Password Hasher, how does it work and is it secure? In both the implementation, The following is used to get the random bytes for the password. RijnDael Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(password, SALT); Asp.net Identity hashing Rfc2898DeriveBytes bytes = new

DCPCrypt/Delphi not properly encoding Rijndael

隐身守侯 提交于 2019-12-07 23:48:13
问题 I have the DCPCrypt package (latest version) and am trying to do AES/Rijndael CBC encoding (128 bit blocks, 256 bit key) in Delphi2007 with test values from the AES Known Answer Test (KAT) Vectors distributed by NIST. One sample test vector: KEY = 0000000000000000000000000000000000000000000000000000000000000000 IV = 00000000000000000000000000000000 PLAINTEXT = 80000000000000000000000000000000 CIPHERTEXT = ddc6bf790c15760d8d9aeb6f9a75fd4e The code below returns: Cyphertext (bytes): 58 215 142

How to store the encryption keys securely in php code file

折月煮酒 提交于 2019-12-07 19:57:36
问题 I have a website that users submit sensitive data to it then a php script encrypts these sensitive data using rijndael 256 and store it in mysql database the problem is that I want to store the key in a secure place that can be accessed only by the php script and not to be seen by any other one 回答1: Depends on how high a security you need for the data. You could consider having a different security key for each user, by possibly encrypting the data that identifies that particular customer and

Password encryption/decryption between classic asp and ASP.NET

杀马特。学长 韩版系。学妹 提交于 2019-12-07 18:12:48
问题 I have 2 websites: one written in classic asp and another written in ASP.NET (1.1 framework). Both applications use a login mechanism to validate user credentials based on a shared database table. Up to now passwords are stored in a 1-way MD5 hash, meaning people must be given a new generated password if they lose the old one. I now want to change this and make the passwords decryptable. I found this Rijndael code to use with classic asp: http://www.frez.co.uk/freecode.htm#rijndael But I

.Net and PHP Rijndael encryption not matching

左心房为你撑大大i 提交于 2019-12-07 09:00:27
问题 At first i thought it was the padding since mcrypt uses zero padding but i changed the php to use PKCS7 and get the same exact results Can anyone help? I think it has something to do with the padding in the php Test output from .Net: Key: d88f92e4fa27f6d45b49446c7fc76976 Text: Testing123 Encrypted: /DMkj7BL9Eu2LMxKhdGT+A== Encrypted after base64 decode: ?3$??K?K?,?J??? Decrypted: Testing123 Test output from PHP: Key: d88f92e4fa27f6d45b49446c7fc76976 Text: Testing123 Encrypted: K+ke5FNI5T6F6B

Perl & Ruby exchange AES encrypted information

耗尽温柔 提交于 2019-12-07 07:57:26
问题 What is the equivalent to Crypt::CBC in Perl for Ruby? Note: This problem similar to PHP/Perl at stackoverflow:655691. Perl Version use Crypt::CBC; use MIME::Base64::Perl; my $cipher = Crypt::CBC->new( -key => "95A8EE8E89979B9EFDCBC6EB9797528D", -keysize => 32, -cipher => "Crypt::OpenSSL::AES" ); $encypted = $cipher->encrypt("ABCDEFGH12345678"); $base64 = encode_base64($encypted); print("$base64"); # output -> U2FsdGVkX18m1jVqRTxANhcEj6aADeOn+2cccDft2eYAMfOkYCvAAkTIOv01VHc/ $de_base64 =

Rijndael Padding Error

耗尽温柔 提交于 2019-12-07 07:01:58
问题 Hello I am trying to encrypt / decrypt a string via Rijaendal. I simply can't figure out why the decryption blows up. I always end up with an incorrect padding error. One thing that throws me off is the result of my encryption which I return as HEX array. It has a length of 14 bytes. In my decryption function, the same byte array ends up having 16 bytes upon conversion from HEX. Any help would be appreciated: using System; using System.Collections.Generic; using System.Linq; using System.Text

Help using Rijndael Algorithm in Delphi 2007. Net

孤者浪人 提交于 2019-12-06 13:28:02
问题 I'm working in Delphi 2007. Net, where I can find an example of using the Rijndael algorithm. Bye. 回答1: Some time ago I wrote this code, should work ok. uses System.Security.Cryptography, System.Text; type TDynamicArrayOfByte = array of Byte; function Encrypt(StrtoEncrypt, PK: string): TDynamicArrayOfByte; // pk, must be of a string of 32 characters var miRijndael: Rijndael; encrypted: TDynamicArrayOfByte; toEncrypt: TDynamicArrayOfByte; bytPK: TDynamicArrayOfByte; i: integer; begin Result :=

DCPCrypt/Delphi not properly encoding Rijndael

我是研究僧i 提交于 2019-12-06 11:37:58
I have the DCPCrypt package (latest version) and am trying to do AES/Rijndael CBC encoding (128 bit blocks, 256 bit key) in Delphi2007 with test values from the AES Known Answer Test (KAT) Vectors distributed by NIST. One sample test vector: KEY = 0000000000000000000000000000000000000000000000000000000000000000 IV = 00000000000000000000000000000000 PLAINTEXT = 80000000000000000000000000000000 CIPHERTEXT = ddc6bf790c15760d8d9aeb6f9a75fd4e The code below returns: Cyphertext (bytes): 58 215 142 114 108 30 192 43 126 191 233 43 35 217 236 52 Cyphertext (hex): 3AD78E726C1EC02B7EBFE92B23D9EC34

Encrypt with PHP Mcrypt and Decrypt with MySQL aes_decrypt?

左心房为你撑大大i 提交于 2019-12-06 10:38:09
问题 Is it possible to Encrypt data with PHP mcrypt and decrypt it in the database with MySQL AES_DECRYPT ? At the moment, I'm using RIJNDAEL_128 for mcrypt on PHP. I've also made sure that the encrypted fields in the database have data type blob . Yet, AES_DECRYPT with the correct key still returns NULL . Any suggestions on how to get this to work? 回答1: I found some good help here Note this works for encrypted text up to 65519 characters in the plain text. (maybe a bit more if no UTF-8 encoding)