encryption

encrypt- decrypt with SHA256 using C/C++

Hi! How can I encode a file using sha256 and c/c++ ??? Thanks! ...

encrypt- decrypt with AES using C/C++

Hi! How can I encrypt decrypt a file with a 256 key AES in c or c++? Which library do you suggest? Thank you! ...

How to secure licensekey generation

Scenario, simplified for brevity: A developer creates an application for a customer. The customer sells this app to end-users. The app requires a license key to run, and this key is generated by the customer for each end-user with a simple tool created by the developer. The license key contains an expiry date for the license and is encr...

Simple way to encode a string according to a password?

Does Python have a built-in, simple way of encoding/decoding strings using a password? Something like this: >>> encode('John Doe', password = 'mypass') 'sjkl28cn2sx0' >>> decode('sjkl28cn2sx0', password = 'mypass') 'John Doe' So the string "John Doe" gets encrypted as 'sjkl28cn2sx0'. To get the original string, I would "unlock" that ...

two AES implementations generated different encryption results

I have an application that uses an opensource "libgcrypt" to encrypt/decrypt a data block (32 bytes). Now I am going to use Microsoft CryptAPI to replace it. My problem is that the libgcrypt and cryptApi approaches generate different ciphertext contents as I use the same AES-256 algoritjm in CFB mode, same key, and same IV, although the...

How do i sign variables?

I have a few variables that must be stored on the client side. As usual anything on client side can be tampered. I would like to sign a few variables and verified them when the data is sent back to the server. At the moment i think they are 5 64bit vars. On the server i would like to sign those 5 variables, then ensure the signature is ...

How to encrypt information in aspx page?

Hi all, I know it's a silly question but , My client asked for encrypting some information form their payment system to prevent user stealing personal information. The system is web-base and written by ASP.NET We have tried some annoying solution such as JavaScript no right-click or css-no-print but apparently my client didn't like i...

Best way to encrypt a directory of files?

I need to programatically encrypt a directory of files, like in a .zip or whatever. Preferably password protected obviously. How can I accomplish this, and WHAT IS the BEST encryption way to do it, if applicable? Programming language doesn't matter. I am dictioned in all syntax. ...

Is there any encryption method for int column?

The scenario is that I want to encrypt finance numbers in a int column of a table of sql server and it is a big app so it is difficult to change the table column type from int to any other type. I use sql server 2005 and asp.net C#. Is there any two-way encryption method for int column of a table? It can be user-defined-function in sq...

Loading and storing encryption keys from a config source

I am writing an application which has an authenticity mechanism, using HMAC-sha1, plus a CBC-blowfish pass over the data for good measure. This requires 2 keys and one ivec. I have looked at Crypto++ but the documentation is very poor (for example the HMAC documentation). So I am going oldschool and use Openssl. Whats the best way to g...

How to create Encryption Key for Encryption Algorithms?

I want to use encryption algorithm available in .Net Security namespace, however I am trying to understand how to generate the key, for example AES algorithm needs 256 bits, that 16 bytes key, and some initialization vector, which is also few bytes. Can I use any combination of values in my Key and IV? e.g. all zeros in Key and IV are...

PGP Command Line Decryption --- How to decrypt file?

I was sent a public key in order to decrypt a pgp-encrypted file as well as a passphrase. I imported the key with: gpg --import publickey.asc And verified it with gpg --list-keys Now, I'm trying to decrypt the file. I put the passphrase in a file called pass.txt and ran this at the command line: gpg -d encryptedfile.txt.pgp --o...

PHP mcrypt usage class?

I'm pretty new at this. Tried to make sense of the manual page for mcrypt at PHP.net when I thought a good tutorial would do a better job. So I searched yet without anything substantial. I also tried one of the examples of using mcrypt to perform the encryption and decryption with 2 functions, but it gives a warning of "Size of key is t...

https security features

What makes https more secure than http? ...

Credit Card storage solution

Hi Everyone, I'm developing a solution that is designed to store membership details, as well as credit card details. I'm trying to comply with PCI DSS as much as I can. Here is my design so far: PAN = Primary account number == long number on credit card Server A is a remote server. It stores all membership details (Names, Address etc...

Can information encoded with a one time pad be distinguished from random noise?

I understand that the cyphertext from a properly used one time pad cypher reveals absolutely no data about the encrypted message. Does this mean that there is no way to distinguish a message encrypted with a one time pad from completely random noise? Or is there some theoretical way to determine that there is a message, even though you ...

AES encryption with PyCrypto and decryption with mcrypt

For some sensitive data I decided to store it AES-encrypted on disc. I've implemented the encryption using PyCrypto. Furthermore, the data is important, and the stored encrypted data will be my only copy of it (backups aside), so I looked for some means of retrieving the data without using PyCrypto to have a fallback given the possibili...

If i encrypt something poorly and then with a strong cipher is it secure?

Pretty pointless but if i encrypt something with my own cypher (i'll assume it is wrong and bad) then encrypt it with something like AES or another known good cypher would that data be safe? Logically i say yes because the top layer is secure. Does anyone know for sure? ...

Use of Curve25519

I'm currently investigating the use of curve25519 for signing. Original distribution can be obtained here and a C code implementation here or here. Bernstein suggest to use ECDSA for this but I could not find any code. ...

While decrypting the web.config get an error

Hi Guys, I am just trying to test this. And here is my command line: aspnet_regiis.exe -pdf "connectionStrings" c:\web.config And this is the error I got. Error – "The configuration for physical path ‘C:\Web.Config’ cannot be opened. And the permissions of that file is not read only. Can anyone please suggest. ...