encryption

Send encripted data from a middlet to a servlet

What the best solution for send encripted data from a middlet to a servlet if I have to send small data in fast manner I try https but the data is inflate, "I don't why" I this moment I have implemented AESLigthEngine with CBC mode (block mode) because CFB mixed mode is slow ...

Generate private RSA key in C#

Hi, I have the values for p, q, n and e and would like to calculate the private key d. How can I do this, could someone give me the example C# code? I am using a BigInteger class to represent the values for p, q, n and e so I assume d will be a BigInteger as well. Thanks, b3n ...

How can I use memfrob() to encrypt an entire file?

#include <Windows.h> void memfrob(void * s, size_t n) { char *p = (char *) s; while (n-- > 0) *p++ ^= 42; } int main() { memfrob("C:\\Program Files\\***\***\\***\***\\***", 30344); } There's my code. If you can't tell, I'm not sure what I'm doing. I've Googled for about an hour and I haven't seen an example of how to use memf...

User Authentication (Using sha1)

I am creating a login form. I am learning how to use SHA-1 to encrypt passwords. I used SHA-1 to encrypt the password that the user created during registration. In the database I inputted pretend username and password data, to have something to work with. I'm having problems getting my login form to work. // Database Connection $con = ...

Could AES-256 be less secure if a portion of the key is known an attacker?

Disclaimer: this is just out of curiosity; I'm no expert at all when it comes to cryptography. Suppose a 256-bit key is composed of the following (UTF-16) characters: aaaaaaaabbbbcccc Futher suppose that an attacker knows the last 4 characters of the key is cccc. Does this knowledge make it easier for an attacker? My guess is that it ...

Basic encryption to authenticate users

I'm writing a web service and I need to make sure only valid applications will use it (before I start managing a session for their users). In order to achieve that I thought of using asymmetric key algorithm, but I'm not really sure how - what data to encrypt, how to manage the keys, etc. (my web service's data isn't that sensitive, I...

Public & Private Keys in .NET besides RSA

Hi All, Am I missing something obvious here (I hope I am), besides RSA, are there any other crypto methods in .NET that use a public & private key? Thanks! ...

PHP Two Way encryption with Salt

Hello, I'm trying to create a two way encryption algorithm for my users passwords. I need it to be encrypted but without the pre set encrypt pass (what i set)(salt?) the original password cannot be decrypted ...

please suggest a good encryption library

Greetings everyone. I am working on a small project and need your help. Here are the details: My project is in VC++ 2008 I need to store some critical resource files bundles with my project exe in encrypted form While running the exe, I want to decrypt and use these files on the fly (without storing decrypted files in temp location) Th...

Encrypting files added to Mercurial repositories on commit

Having read this past question for git, I would like to ask if there exists something like that, but can be done programmatically (file list) on each machine; works for Mercurial. The reason for this is that I would like to include in my public dotfiles repository some configuration files that store password in plaintext. I know I co...

encrypt and decrypt property file value in java

I am looking for a way to encrypt a password in a configuration file that is being read by a Java program. Currently, I read-in the password from the text file, but that leaves the password sitting right out in the open if someone were to look at the config file. I was thinking of building a simple class where user could type in their d...

Data encryption on PhoneGap applications?

Hi all, My company develops mobile apps that require encryption in their functionality for multiple platforms - iPhone, BlackBerry, J2ME, WinMobile, and probably Android in the near future. I've been trying to find ways to develop our apps such that all the app logic can be developed in a single code-base with a different UI wrapper for...

Which is the best way to hide the PHP source code?

Which is the best way to convert the PHP code to not human readble format? ...

2 Way Encryption Passwords?

Question says it all, should passwords be stored using 2 way encryption or just 1 way? ...

only use ssl on login? or whole site?

I'm currently building a web-based file upload/download hub for a company that wanted an easy way to send files to customers. My question revolves around which parts of the site really need to be SSL encrypted. Is it good practice to only encrypt the login forms, but leave other parts of the site (like the file transfer process) unencr...

hmac message encryption but using our own key

try { // Generate a key for the HMAC-MD5 keyed-hashing algorithm KeyGenerator keyGen = KeyGenerator.getInstance("HmacMD5"); SecretKey key = keyGen.generateKey(); // Generate a key for the HMAC-SHA1 keyed-hashing algorithm keyGen = KeyGenerator.getInstance("HmacSHA1"); key = keyGen.generateKey(); } catch ...

How to choose a salt for a hash function meant to protect passwords?

I'm a (near complete) beginner, and this is my first foray into encryption - in fact this is probably the first time I use the word. Here is my question: For a non banking / military, or even commercial, web app, what is the right way to choose a salt for a hash function used for passwords? I can easily generate a pseudo random salt f...

OpenSSL: Is it possible to use AES CTR mode encryption using the EVP API?

Hi All, I'm new to OpenSSL. I understand that encryption should be performed using the EVP API which acts as a common interface to all the ciphers. AES CTR mode seems to be present in the version of OpenSSL that I have, but the definition for EVP_aes_128_ctr is disabled in evp.h: #if 0 const EVP_CIPHER *EVP_aes_128_ctr(void); #endif A...

Is this Paypal setup secure?

I just wanted to run this by other heads to make sure I wasn't missing something obvious. I am using Payflow Link, which handles all the credit card nastiness of ecommerce transactions. However, you pass the total amount of the transaction to PayPal over POST variables - which seems like a potential security hole: A malicious user coul...

How do I generate an encrypted password string, as it is in /etc/shadow?

Hi, I'm trying to mimic the creation of password strings as they appear in /etc/shadow. This is what I've got so far, but the encrypted passwords don't match, when I use the same password and the same salt. 5000 rounds is standard for crypt, so I used that as well, but I don't see where exacly I made a mistake: I'm doing this in Perl,...