encryption

Which it better? pre-generate asymmetric keys keys or generate them in realtime?

Assuming a keystore is secure and one needs to service around a million keys , is it better to generate asymmetric keys in real-time or is it better to generate a bunch of keys and store them to be used as and when required? Edit 1: By real time I mean generate a key pair when a user registers for the first time , from then on that key...

where do I buy low quantities of smart cards?

I need to buy a few smart cards (under 5) for some development work. I've got readers and I'd prefer not to buy one of the expensive SDK's offered by several companies. I'm hoping to get some help from you folks on a few questions Background: for the card I need to do public/private key encryption. I'd like for the card to hold the p...

How to encrypt a text file using C?

I want to have a program like this: scanf("%s", name); scanf("%s", id); scanf("%d", &age); Now I want to write name, id and age to a file, but the file should be encrypted, so that only my program can read back the data it wrote. Do I need to use one of the encryption libraries mentioned here (they all are pretty heavy duty libraries...

Rijndal Algorithm using C#

I want the code of Rijndael algorithm to encrypt any given text to store it in a database, I also want to know how to reverse the encryption method, ie: decrypt the encrypted text to use it. ...

How to store and verify digits chosen at random from a PIN/Password

If I have a users 6 digit PIN (or n char string) and I wish to verify say 3 digits chosen at random from the PIN (or x chars) as part of a 'login' procedure, how would I store the PIN in a database or some encrypted/hashed version of the PIN in such a way that I could verify the users identity? Thoughts: Store the PIN in a reversible ...

SUBMIT certificate request - outside domain

Hello I need to submit a PKCS#10 certificate request to a certificate authority who is outside my domain. This article in MSDN shows a way to submit certificate requests within a network using ICertRequest2 COM object. hr = CertRequest->Submit( CR_IN_ENCODEANY | CR_IN_FORMATANY, RequestStr, AttributesStr, CANa...

Best Practices for MySQL Encryption?

I'm looking for guidance on encrypting fields (and/or tables if possible) for MySQL. I will settle for a decent tutorial but I'd really like specific tips on managing the transition from an unencrypted schema to one utilizing encrypted fields. Thanks! ...

Problems writing a protocol on top of sockets in Java

Hi, I'm writing a protocol on top of sockets, so I've decided to implement headers then send the information. So there is one thread per connection on the server which sits there reading in headers, then delegates off to methods to read in the rest of the information when it arrives. So essentially it looks like this: while ((length ...

MPPE - Forcing strong passwords enough to make PPTP secure?

The title pretty much says it all. Note I'm talking about MS-CHAP v2, not v1. Also using EAP-TLS is not an option (that's why I'm asking this.) ...

Maximum length for MD5 encryption

What is the maximum length of the string that can have md5 encription or Is it has no limit, and if so what will be the max lendth of the md5 encripted value? ...

Can data stored in iPhone App be taken from sqlite or Preferences list file?

I am planning to store a password in my Native app (Android and iPhone). Should I store them after encrypting it ? or can I store it without any encryption? Are they really secure? ...

algorithm for multiple digital signatures?

suppose I have a packet of data and that I am sending the data to 10 users. I want to add an attribute to this data, something like a digital signature. Each of the 10 users would have a different "key". When they apply their key to this special signature on the data packet it returns either true or false. However they cannot determine, ...

Installing SunJCE on Android?

The company I work for is wary of Android app development because the default cryptography library, Bouncy Castle, is not FIPS-140 certified. Nothing I can do to change their minds or policies. I'm wondering what options I have for installing (or at least bundling) SunJCE with my app. For one, I can't find where I would download the...

Looking for encrypt/decrypt functions

I have an array of IDs (e.g. array(1, 2, 10, 34, 100, 101)) that represents files ids of pictures in database. I would like to send a link to customer by email such that when he press this link he will see the pictures, but I don't want customer to see these files ids! Thus, I thought to encrypt the array of pictures ids with some key ...

Question about Project Euler Problem #59

I have been trying to solve this question for a while, and I am having trouble because some of it seems somewhat more ambiguous than previous problems. As background, the problem says that the given text file is encrypted text with the ASCII saved as numbers. The encryption method is to XOR 3 lowercase letters cyclically with the plainte...

Backwards HTTPS; User communicates with previously generated private key

I am looking for something like https, but backwards. The user generates their own private key (in advance) and then (only later) provides the web application with the associated public key. This part of the exchange should (if necessary) occur out-of-band. Communication is then encrypted/decrypted with these keys. I've thought of some...

Encrypt password C#

Im implementing users account in my website.I need to encrypt passwords from new members,however im getting crazy with many options that ive found to accomplish that. Symmetric and asymmetric cryptosystems, public versus private keys, digital signatures, hash algorithms, RSA, DES, Rijndael, PGP, MD5, SHA-1, https, secure sockets, Camell...

How do you safely store an encryption key in .Net?

If you have a .Net application (or any other application for that matter,) how do you safely store internal encryption keys? I'm not talking about user-entered keys, but keys that are hard-coded in the program itself, for talking between other instances of the program. For example, if you have a peer to peer type program, you may want to...

How to code number in string and later decode it ?

I'm looking for encrypt/decrypt functions that will encode numbers (0, 1, 2, ...) into strings, such that these strings will look random, and later the number could be decodes back from the string. For example: 3 will be encrypted to ABFQWEMasdEE, and 6 will be encrypted to poad_Asd#@sad. If I could control the number of characters in ...

How to use encrypted password in apache BasicDataSource?

At present i am keeping the password [ unencrypted ] in a property file. This password get placed as is in the configuration xml using ant. [ The configuration xml is for datasource, it is creating the object of dbcp.BasicDataSource ] Now, is it possible that after the ant target the password is copied in encrypted form. Heard the Ja...