encryption-symmetric

SQL Encrypted Columns in WHERE Clause

空扰寡人 提交于 2019-12-18 13:04:15
问题 I am looking to apply SQL column level encryption using symmetric keys. The initial steps needed to create the Database Master Key, Certificates and Symmetric Keys seems straight forward and I have tested encrypting/decrypting data using Symmetric Keys successfully. However, once the data is encrypted I don't know how best to query it. E.g. SELECT PlainTextA, PlainTextB, PlainTextC WHERE CONVERT(varchar, DECRYPTBYKEY(EncyptedColumn)) = @SearchTerm would surely result in a full table scan?

Really simple encryption with C# and SymmetricAlgorithm

倖福魔咒の 提交于 2019-12-18 10:33:46
问题 I'm looking for a very simple crypt / decrypt method. I will be using always the same static key. I'm aware of the risks of this approach. Currently I'm using the following code but it does not generate the same result after crypting and decripting the same string (there is some garbage in the middle of the string). public static string Crypt(this string text) { string result = null; if (!String.IsNullOrEmpty(text)) { byte[] plaintextBytes = Encoding.Unicode.GetBytes(text); SymmetricAlgorithm

Using Jasypt for password based AES encryption with PBKDF2WithHmacSHA1 key

核能气质少年 提交于 2019-12-14 03:52:11
问题 I'm implementing an encryption mechanism where I work, and the security guy's demands are as follows: Create a 256 bit key using PBKDF2WithHmacSHA512, secret password, 256bit salt and 20000 iterations minimum. Salt should be generated using SecureRandom.getInstance("SHA1PRNG"); Encrypt using AES256 with the derived key. I'm trying to use Jasypt's StandardPBEStringEncryptor class encryptor.setPassword(PASSWORD); encryptor.setAlgorithm("AES/CBC/PKCS5Padding"); encryptor

How to implement “AES/CFB/NoPadding” Encryption/Decryption in WinRT C#?

五迷三道 提交于 2019-12-14 03:18:29
问题 We are porting the existing code to Windows 8 now, the data file downloaded from the server is encrypted in "AES/CFB/NoPadding", and we cannot change the data encryption mode because the data file is used by a lot of existing clients. In WinRT , the [SymmetricAlgorithmNames][1] doesn't contains a name to match "AES/CFB/NoPadding". And from the [SymmetricKeyAlgorithmProvider][2] document, the NoPadding algorithms don't contain "CFB" No padding: DES_CBC DES_ECB 3DES_CBC 3DES_ECB RC2_CBC RC2_ECB

Encrypt in Java and Decrypt in MS SQL Server

邮差的信 提交于 2019-12-13 22:32:51
问题 My application flow is as follow. JAVA APP ----> MS SQL (Tables)---> MS SQL (Stored procedure) ---> Another DB Here from Java application i am pushing certain Sensitive information that i even want to hide from DBA. So i want to encrypt those column values from java and before the Stored Procedure pushes it to Another DB i want to Decrypt it in SQL code. But the Problem is that MS SQL do not allow Custom Keys to be passed for Encryption or Decryption .It generates those keys itself and we

How to XOR two hex numbers in bash script? (XOR Encryption)

青春壹個敷衍的年華 提交于 2019-12-13 03:44:37
问题 I write a bash script who manipulate hex values and i need to do XOR operation between two hexa numbers. My problem is when i try in bash prompt it's work and return right value but in script this value is false. When XOR variable $ExtendAuthKey and $IPAD the result must be : 181ad673a5d94f0e12c8894ea26381b363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636 But in fact i get this value : 3906369333256140342 I dont understand this behavior, if you

Symmetric and public key encryption

旧城冷巷雨未停 提交于 2019-12-13 03:08:07
问题 Suppose N people want to communicate with each of N- 1 other people using symmetric key encryption. All communication between any two people, i and j, is visible to all other people in this group of N, and no other person in this group should be able to decode their communication. How many keys are required in the system as a whole? Now suppose that public key encryption is used. How many keys are required in this case? I have found two answers for symmetric that state it is either n(n-1)/2

Encrypt in .Net and decrypt in AS3

橙三吉。 提交于 2019-12-13 02:43:33
问题 I need to encrypt some files in ASP.net and decrypt them in a flash application built with Action Script 3. AS3 developer found a lib call AS3crypto which seems like a good one for AS3. The idea is encrypt and decrypt using same key. Symmetrical Encryption? But I am struggling to find .Net equivalent that would use same algorithm for encryption. I have tried RC4 example from 4guysfromrolla blog which works too slow for me. I have tried AES on this example (http://msdn.microsoft.com/en-us

Include an encrypted password in a URL? Possible?

心已入冬 提交于 2019-12-13 02:16:41
问题 We have a typical web-based login system. We want customers to have the ability to generate a "login link" that doesn't ever expire and includes their password. We want to therefore create a link which includes their password in encrypted form. NOTE: I know the best way is a lookup table where each link has a unique key... I won't go into why that won't work for us; it won't. I'm not familiar with public key encryption.. Maybe that's what I need? Here's what I'm thinking. This still might not

Rijndael padding or length is invalid

折月煮酒 提交于 2019-12-13 01:37:51
问题 I am trying to encrypt/decrypt a string using eith Rijndael or Aes and the code below. public class Crypto { private const string defaultVector = "asdfg123456789"; private const CipherMode cipherMode = CipherMode.CBC; //Have tried PaddingMode.ISO10126, PaddingMode.None, and PaddingMode.PKCS7 private const PaddingMode paddingMode = PaddingMode.ISO10126; private const int iterations = 2; private static Rijndael GetCrypto(string passphrase) { var crypt = Rijndael.Create(); crypt.Mode =