Questions tagged [encryption-symmetric]

1

votes
0

answer
128

Views

Encrypt db file to crypt12 format

I have decrypted crypt12 file into .db file. Modified some changes. Now again, Is there a way to encrypt .db file into crypt12 format?
user9945312
1

votes
1

answer
163

Views

SQL Server Stored Procedure with Cursor causing error

I get this error message. Can anyone help me to fix my query? What is the right way to use the cursor? This stored procedure should fetch data from a temp table and insert it into two different tables. Some of the columns in the temp table like EID, FN, MN, LN should be inserted into table dbo.tblUs...
1

votes
1

answer
37

Views

Windows UWP AesCbcPkcs7 encrypt/decrypt block at a time

I have an application that I want to release to the Windows App store. So there is limited set of APIs that can be used. It needs to encrypt/decrypt very large amounts of data. I can find examples on how to load ALL the data into an IBuffer and encrypt/decrypt it. I would like to do this on say 8K...
r.t.s.
1

votes
0

answer
106

Views

Python - Cryptographic Feistel function (AUT64) - Math/programming trouble in implementation

Don't know how to add math symbols, hence the image paste: Based on this: https://tches.iacr.org/index.php/TCHES/article/view/874/826 (page 52) I managed, I think to implement compression function (1) However, don't understand what 2,3 and 4 mean. Can somebody with math/programming knowledge explain...
dev
1

votes
0

answer
29

Views

Use Oracle Wallet To Store Symmetric Keys

Can I use Oracle Wallet to store and retrieve symmetric keys? For example to use them by DBMS_CRYPTO to data encryption/decryption. thanks
hmmftg
1

votes
1

answer
83

Views

AES Known-Plaintext-Attack and IV?

Edit: I address Known-Plaintext-Attack and Chosen-plaintext attack (both) with my question I have a little problem understandig the right use of IV. AES is only safe against Known-Plaintext-Attack if I use a different IV for every message. Right? I need to know the used IV to decrypt a message. Also...
Franken
1

votes
0

answer
28

Views

How to implement Cycle Walking Method of FPE to get length of output encrypted string same as input string length?

As per Cycle Walking Method concept in Format Preserving Encryption (FPE) as follows Say M is our desired output length of String, X is Plain Text AES(X)=Y if (Y>M) { AES(X) } We do this cycle until we get desired output length. But when I tried doing this by writing a loop on top of AES Encryption...
Nishanth Shanmugam
1

votes
2

answer
104

Views

Generate web service client secure policy from .wsdl for java

I have been researching how to implement a web service client policies from a .wsdl file. The policies of the web services implicates a signature and encryption using a .jks file with the necessary keys (asymmetric privateKey for signing, and a symmetric privateKey for encryption). The policy is: u...
user2162417
1

votes
1

answer
1.1k

Views

How to use secure encryption of an existing column in SQL Server 2005

I want to encrypt an existing column in SQL Server 2005, using an UPDATE statement, moving the old content into the new encrypted column. So I have 2 choices: Symmetric and Asymmetric. The issue I have is that with a symmetric key, I have to embed the password into an SP in order to read the column...
Dominic Zukiewicz
1

votes
1

answer
318

Views

RijndaelEncryption with Java then Decryption with C# and EnterpriseLibrary 4.1

I believe when the EnterpriseLibrary tries to decrypt a RijndaelManaged encrypted string it expects the Initialization Vector to be prepended to the encrypted text. Currently with the code below. I can decrypt the message with out an exception, but I am getting weird characters like: �猀漀椀...
sgmeyer
1

votes
2

answer
305

Views

What method of encryption is suitable for encrypting individual words, and also an entire document?

I need to save several documents to the cloud and need to save the documents, document metadata, and words/phrases for searching. My plan is to use a symmetric cypher for encrypting the whole document, but I'm unsure of the right way to hash each word. I would like something secure, but I don't wan...
random65537
1

votes
1

answer
568

Views

Protect/Encrypt Initialization Vector

Is it necessary to protect the initialization vector of AES encrypted data or does it increase the security of the encrypted data if it is protected? With 'protected' I mean, that it is treated equaly as the encryption key, e.g. being encrypted with an asymmectric encryption or being only accessible...
HCL
1

votes
1

answer
711

Views

SQL Server 2008 symmetric key opening with different passwords?

In my scenario I use a symmetric key to encrypt my asymmetric key, the latter is used to encrypt some sensitive data which should be available only to a selected ring of people. The symmetric key is encrypted with password and what I need is the possibility to have several passwords for this key so...
Alexander Galkin
1

votes
1

answer
302

Views

Safe to store AES cipher parameters (blocksize/blockmode/keysize etc) in file header?

Is it 'safe' to store cipher parameters in the (unencrypted) header of an encrypted file? Is there anything (other than the key of course!) that shouldn't be stored/transmitted in the clear?
Satellite
1

votes
2

answer
4.2k

Views

CCCrypt encryption result issue

I'm using CCCrypt for encryption/decryption string values. It seems to work fine, because decrypted value equals initial one, but the problem is I can't extract proper NSString object from decrypted data. @implementation NSData (AES256) - (NSData *)AES256EncryptWithKey:(NSString *)key { char keyPt...
Solomiya
1

votes
2

answer
841

Views

openssl AES256 multiple encryption of file parts (join later)

For partial file upload and encryption i'd like to read chunks (example: 10MB) from a large file (example: 100MB), encrypt the chunk with AES256 and upload the chunk to the server. On the server the chunks are joined together to one big file (which then should represent the complete encrypted file)....
Jonas Schnelli
1

votes
1

answer
590

Views

Windows.security.cryptography API fails due to key length issues

I've been trying to use the Windows.security.cryptography API in Windows 8 (Windows store app) for basic symmetric key encryption of a string (for now). Looked into various samples online, but in all of them, the code fails with an unexpected key length exception for me. static byte[] cKey = { (byte...
Akash
1

votes
1

answer
162

Views

Coefficient matrix in AES in Decryption stage

I know that in AES, in encryption stage, in MixColumns, we use [4x4] coefficient matrix with values having only (00,01,02,03). Does anyone know what values are used for coefficient matrix in InvMixColumns at decryption stage? I know those coefficients occur by taking inverse of 00,01,02,03 in rajind...
Justin Carrey
1

votes
2

answer
5.5k

Views

Bad Padding Exception :pad block corrupt when calling dofinal

I am working on encryption and decryption. I am very new to cryptography and i am facing pad block corrupt exception when using bouncy castle Here is my encryption/decryption code. private AESFastEngine engine; private BufferedBlockCipher cipher; private final KeyParameter key=setEncryptionKey('test...
pradeepds
1

votes
1

answer
753

Views

Invalid key size in Java symmetric encryption program

This is my basic symmetric encryption program. As im learning now I want to know how this is working. And I have the following Exception: Exception in thread 'main' java.security.InvalidKeyException: Illegal key size or default parameters at javax.crypto.Cipher.a(DashoA13*..) at javax.crypto.Ciph...
user1282709
1

votes
1

answer
559

Views

Pr0blem with AES256 encryption in java

So.. here is the class: (I use and made for AES256 encryption) public class AES256 { private String charSet = 'UTF-8'; private String algo = 'AES/CBC/PKCS5Padding'; private String baseAlgo = 'AES'; private String hashAlgo = 'PBKDF2WithHmacSHA1'; private String key = null; private String salt = 'defa...
user2494817
1

votes
1

answer
423

Views

using java to encrypt/decrypt files return wrong number of bytes when using padding

I'm trying to make an application that encrypts / decrypt and it is working fine when I use a cipher mode without padding. With padding, the number of blocks is unpredictable and I cant find the source of the problem. I am using the following code to test: private static final int KEY_LEN = 16; pri...
mrafael
1

votes
2

answer
497

Views

AES_ctr128_encrypt on Solaris doesnt decrypt same as other OS's

I've compiled the libcrypto.so shared library from openssl-1.0.1g for various platforms. Using the shared library, my app is able to encrypt/decrypt data between any of the following: Linux i386 Linux x86_64 Linux PPC AIX RISC These can decrypt their own data, but NOT each other, nor any of the abov...
ajjsd
1

votes
1

answer
490

Views

GPG - Max Keysize with TWOFISH symmetric encryption

I'm using a script to pack and encrypt archives in order to backup them in cloud storage. It generates shell commands like this: cd /vault/backup/pictures; tar cf - vacation-201309 | xz -3 | gpg --symmetric --cipher-algo TWOFISH --digest-algo SHA512 --no-secmem-warning --yes --batch --passphrase-fil...
royskatt
1

votes
1

answer
341

Views

NSIS unicode cypher plug-in

Is there a NSIS unicode plug-in for symmetric encryption/decryption available? I tried Blowfish and NSISCrypt with Unicode true option. Blowfish doesn't seem to give any output whatsoever, and NSISCrypt gives some strange (I believe Chinese) characters, and can't even get decryption part to work wit...
Stefan Jovanovic
1

votes
1

answer
2k

Views

openssl_decrypt always returns false

I tried to migrate my encryption from mcrypt to openssl but the decryption keeps failing. The code Below shows my encryption function. I placed the var_dump in the encryption function to verify decryption with identical variables works, which it does not. I tried the following changes to the code,...
Us3r
1

votes
1

answer
112

Views

CipherOutputStream corrupting headers in Android

I'm using a simple CipherInput/OutputStream to try to encrypt/decrypt files in android. The problem I'm having is that it seems to be corrupting the first few bytes of the file but not the rest. Here's an example of an output from a simple text file: Original Text: 'Test for Android cipher. The qui...
Nuvious
1

votes
1

answer
234

Views

How to encrypt a file using Crypto API with multiple threads?

I am trying to encrypt a file using multiple threads and Crypto API / AES256 / CBC mode / NO IV (initialization vector) is used. I am dividing the file into as many number of threads. The thread which gets the last block of the file, does a CryptEncrypt passing Final as true. Following the approach...
Abhishek Jain
1

votes
2

answer
362

Views

Can we use the key as the IV for AES?

I wish to be more efficient in generating a random key and a random IV for the encryption. But is it workable and safe to use the random key as the IV?
Chong Lip Phang
1

votes
1

answer
549

Views

max plaintext size for Android Keystore symmetric encryption?

I'd like to use the Android Keystore to do symmetric AES encryption of large (multi MB) data files. I've written demo code that will encrypt/decrypt multi-KB files with the Keystore, but when the file size gets too large it starts to fall down. This max size varies by device and can range anywhere...
paleozogt
1

votes
1

answer
400

Views

SQL Encryption - Why does the Master Key automatically refer to the Certificate?

I just recently came in touch with MS SQL Encryption, where I used a Master Key, a Certificate and a Symmetric Key. When I tried to DEcrypt it, I've had quite the hard time getting through the key opening in the right order. Essentially I wrote something like this: OPEN MASTER KEY BY PASSWORD ('Pass...
1

votes
1

answer
570

Views

AES encryption example class to encrypt data using user's password

In a Python 3 application I need to encrypt user's data using his own password. I'm using Cryptodome library. Given that AES needs a fixed size key (128bit in the example), I used PBKDF2 to get the key. Below is the class I use in my code. I store the salt (salt in the code) used for key derivation...
decadenza
1

votes
1

answer
244

Views

How to generate a symmetric key using sjcl

Is it possible to generate symmetric keys using sjcl? I want to return the symmetric key rather than just calling the sjcl.encrypt() function. Please provide a code example if possible.
E.N.D
1

votes
1

answer
494

Views

What is API in OpenSSL like Java DES/CBC/PKCS5Padding?

I want to decrypt password which was encrypted by 'DES/CBC/PKCS5Padding' of javax.crypto.Cipher. I have to use OpenSSL to decrypt the password. Which API in OpenSSL should I use? I know API for DES3 is DES_ede3_cbc_encrypt, and want to know DES.
Edure
1

votes
2

answer
312

Views

password encryption techniques and secure key transfer using angularjs and .net

I have an application which uses AngularJs 1.5 as front end and .net framework as a backend.In my application, I have to store username and password on the database which comes from the front end.The requirement is: AngularJs will encrypt the password and send it to the backend On the backend, encr...
Kesiya Abraham
1

votes
1

answer
0

Views

Understanding the Hill cipher algorithm

I want to implement Hill cipher but I think I have a problem in understanding the algorithm itself. The key I'll use is a 2X2 matrix and I'll encode 2 characters each time. I'll multiply the key matrix with the matrix of 2 characters then modulus the result on 26 as this equation. C = E(K, P) = KP...
palAlaa
1

votes
2

answer
0

Views

Securing individual DB fields

My application needs to store bank details and credit card numbers in a database. We support several DB variants and we try to avoid wherever possible any DB specific features that may not port easily to another. Therefore I'm looking for a simple yet reasonably secure way of encrypting certain fie...
Mike Q
1

votes
1

answer
0

Views

.NET: Best practice to encrypt sensitive data on a client application?

I need to securely store a user/password pair on a client .NET application (Outlook addin). Encryption needs to be reversible, and I'd be glad to avoid storing an encryption key in my code, as it's easy to get through disassembly. In fact, I'd like to access an EFS-like API to delegate the encryptio...
Vinzz
1

votes
5

answer
0

Views

Encryption Project: Need advice on how to eliminate method overhead

I am looking for advice. I have developed my own encryption algorithms because I enjoy it and I can. Now, I am looking to try a new idea. My idea involves consolidating a number my algorithms into a larger one. For instance, you call X.Encrypt() then it uses A.Encrypt(), B.Encrypt(), C.Encrypt() etc...
WaffleTop
1

votes
2

answer
0

Views

In VB.NET, writing AES key and encrypted data to same MemoryStream not working

I'm attempting to use symmetric encryption to encrypt some data, and store the key necessary to decrypt with the data in a MemoryStream. (While I know that this alone is really dumb security-wise, I'm going to use RSA to encrypt the symmetric key. Right now, though, I'm trying to just get this part...
Sam Cantrell

View additional questions