cryptography

Communication Between MS 2003 CA Server and Client - Non active directory environment :Design Query

Hello I have a scenerio where the CA and its clients are not in an active directory environment(win2003 enterprise). They are located physically apart(different places). For example, *If the domain name is 'ExampleBank.org'* *The CA name is 'ca.ExampleBank.org' * *CA type is Enterprise Root CA (online) [windows 2003 enterprise ser...

How to configure ASP.NET MembershipProvider with custom cryptography?

I want to set System.Web.Security.Membership.HashAlgorithmType (or thru web.config) to a custom Cryptography class I created, In this function I have Encrypt and Decrypt functions I wanna map the property value to use this class. How do I do it. PS. I don't mind to change the crypto class' struct, my point is using a custom crypto clas...

Encrypt/Decrypt password usage in a custom MembershipProvider?

Hi folks! I implemented a custom membership provider. I've also implemented my custom AES Encryption/Decryption overriding the abstract EncryptPassword/DecryptPassword of the MembershipProvider. however, when I trigger ValidateUser, the password is not automatically converted, am I missing something? Is it supposed to be called automa...

AES 256 encryption

Hi, I am using AES 256 to encrypt/decrypt some plain text. But the algorith uses only PKCS7 for padding, but I need to use PKCS5 to make it compitable to other platforms. How can I acheive this? My source code is: public string Encrypt(byte[] PlainTextBytes, byte[] KeyBytes, string InitialVector) { byte[] InitialVectorBytes = Encoding...

Python Encryption: Encrypting password using PGP public key

I have the key pair generated by the GPG. Now I want to use the public key for encrypting the password. I need to make a function in Python. Can somebody guide me on how to do this? I studied the Crypto package but was unable to find out how to encrypt the password using the public key. I also read about the chilkat Python encryption l...

RSA pubkey file type detection

Hi all! I got a RSA pubkey.dat (almost obvious what it is) that has the following structure on contents: ASN1 Integer of around 1024 bits (Modulus) ASN1 Integer (Exponent) Blob of 256 bytes (Signature) No tags like "----begin---" or so. pure hex values in it. There's any way to identify its format like if it's DER/PEM/etc , so i ca...

RSACryptoServiceProvider CryptographicException System Cannot Find the File Specified under ASP.NET

I have an application which is making use of the RSACryptoServiceProvider to decrypt some data using a known private key (stored in a variable). When the IIS Application Pool is configured to use Network Service, everything runs fine. However, when we configure the IIS Application Pool to run the code under a different Identity, we g...

XML DSIG Verification

I'm digitally signing a XML document and verifying it on 2 different machines (Sign it at one machine and verifying on another). I'm doing the following to verify the XML DSIG in CSharp.Net. public static Boolean VerifyXml(XmlDocument document) { document.PreserveWhitespace = true; // Create a ne...

Cross-platform way of hiding cryptographic keys in C++?

Hi, My application needs to use a couple of hard-coded symmetric cryptographic keys (while I know that storing a public key would be the only perfect solution, this is non-negotiable). We want the keys to be stored obfuscated, so that they won't be recognizable by analyzing the executable, and be "live" in memory for as little time as p...

Best way to add a simple licensing scheme to a .NET program?

Hi, We're releasing a shareware application. Whats the easiest way to add a simple licensing/copy protection scheme? We don't mind paying for the results. I'm particularly interested in what has worked in your experience, and what things to prioritize (or avoid) in a licensing scheme. Here is my shortlist (if you could add to it I'd ...

Multiuser access to encrypted data

I'm building a server-side application which requires the data the be stored encrypted in the database. When a client accesses the data, it also has to be transferred encrypted. The clients each has a unique login. My original idea to do this, is to store the data encrypted with a symmetric-algorithm like AES. So when a client wants to ...

Insecure Crytographic System

Hi :) I am a newbie in cryptographic system but i have seen many sources tell that even the good algorithm and good key is not enough, i have a little confuse why is that? ...

Creative uses for cryptography beyond the usual encryption/authentication

Lately I've been intrigued by some of the less traditional uses of cryptography. Things like: making invoice numbers unpredictable rolling dice in a p2p game shuffling a deck of cards in a p2p game What other applications of cryptography can you think of outside the usual realm of message authentication and confidentiality? ...

An internal error occurred. the private key that you are importing might require a cryptographic service provider that is not installed on your system

When I compile my application , I get following compile error. Unable to find manifest signing certificate in the certificate store. Then I find the resolution for the above error and then try to import certificate, I am getting following error. An internal error occurred. the private key that you are importing might require a cryptog...

Encryption with Python

I'm making an encryption function in Python and I want to encrypt a random number using a public key. I wish to know that if I use Crypto package (Crypto.publicKey.pubkey) than how can I use the method like... def encrypt(self,plaintext,k) Here the k is itself a random number, is this mean the key. Can somebody help me with somewhat ...

Encrypt Password in Configuration Files? (Java)

Hey Folks, I have a program that reads server information from a configuration file and would like to encrypt the password in that configuration that can be read by my program and decrypted. Requirments: Encrypt plaintext password to be stored in the file Decrypt the encrypted password read in from the file from my program Any recc...

Must a secure cryptographic signature reside outside of the file it refers to?

I'm programming a pet project in Python, and it involves users A & B interacting over network, attempting to insure that each has a local copy of the same file from user C. The idea is that C gives each a file that has been digitally signed. A & B trade the digital signatures they have, and check it out on their own copy. If the signatu...

Recommended Python cryptographic module?

I've been exploring what cryptographic modules are available to Python, and I've found 3: ezPyCrypt, yawPyCrypt and KeyCzar (which actually supports a few languages, but Python is included amongst them). The first two rely on the PyCrypto module. Are there choices I am missing? Is there a clear front-runner for ease and features or does...

What block cipher mode to use? CFB adequate?

I want to use AES to encrypt some data of arbitrary length, and I'm wondering what block cipher mode I should use. http://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html recommends AES in CTR mode. I'm writing a Ruby on Rails plugin, and unfortunately OpenSSL (which Ruby has standard bindings for) doesn't support CTR...

encryption with python

If I want to use: recip = M2Crypto.RSA.load_pub_key(open('recipient_public_key.pem','rb').read()) Then how will it retrieve the key? What will recip will print? I need to get the public key of the recipient from the server(open key server) and for that first I need to store the key on server. ...