How to properly link an external library using CMake?

I'm trying to use the Chilkat C++ library to do a cryptography assignment, but I cannot seem to get the library to link properly. As of right now the header file CkRsa.h cannot be found by the compiler. I've spent a few hours searching across the int

RSA key pair & ldquo; diversification & ldquo;

Symmetric keys (AES, 3DES, ...) can be diversified by a specified diversification input. It is usually done this way: DivKey = Enc[PlainText = Key, IV = DivInput, K = Key] However, this is based on the fact that each 16-byte array is a valid AES key.

How to limit the slashes of an encrypted text

I am encrypting text using Rfc2898DeriveBytes in C# Following is my code private static string Encrypt(string clearText) { string EncryptionKey = "MAKV2SPBNI99212"; byte[] clearBytes = Encoding.Unicode.GetBytes(clearText); using (Aes encryptor =

Get a cryptographically strong random number?

How do I get a cryptographically strong random number in Erlang, equivalent to reading from /dev/random on Unix? So far I've only seen recommendations to use random:uniform and seed it with something like now() which is not strong enough. (Yes, I'm a

Convert a hexadecimal string to bytes in crypto ++

I have string of hexadecimals which I need to convert to const byte*. I am using Crypto++ to do hashing and it needs the key to be in const byte* Is there any way i can convert the string of hexadecimal into const byte* using any of the Crypto++ libs

Bruteforce XOR encryption

Is it possible to bruteforce the standard XOR cipher? Knowing that this: *#([email protected] is encoded with a XOR function // std::string CStringCoding::Xor( const std::string& strIn ) { std::string sOut = ""; for(std::size_t loop = 0; loop < strIn.

Ability to convert RSA private + public key to .pfx file?

I've got an RSA (XML) private+public key. Is there any way to create a .pfx file from this?Since you tagged .NET I'll assume you're looking for an API do to this... The assembly Mono.Security.dll, that ships with Mono but works well with MS.NET on Wi

A non-repetitive alphanumeric code shorter than UUID in MySQL

Is it possible for MySQL database to generate a 5 or 6 digit code comprised of only numbers and letters when I insert a record? If so how? Just like goo.gl, bit.ly and jsfiddle do it. For exaple: http://bit.ly/3PKQcJ http://jsfiddle.net/XzKvP cZ6ahF,

AES implementation incompatible between Botan and phpseclib

I'm using Botan library for AES encryption/decryption in C++. I cannot use the output of Botan in phpseclib with accurate results. I would appreciate if someone points me a working code for interoperability between Botan and phpseclib or any other PH

Hashing using SHA1 as the innermost hash in a chain

A client program (over which I have no control) is authenticating by sending me a password, hashed as SHA1(password). I'm reluctant to store the password hashed using only SHA1 in my database, so I'm proposing to store passwords in the database hashe

How to make this PKCS7 signature in node.js?

So I'm porting a ruby library to node.js, and need to create a PKCS7 signature. Here's what the ruby lib is doing: p12_certificate = OpenSSL::PKCS12::new(File.read('some-path.c12'), self.certificate_password) x509_certificate = OpenSSL::X509::Certifi

Key Management in Windows Azure

I'm a bit confused about how to store keys (for data encryption) in Windows Azure. According to the following two links (#1, #2), it is recommended to store the keys/key library in the Windows Azure Storage: Storing your own key library within the Wi

Linux Kernel Crypto Guide

I am working on a kernel module to encrypt/decrypt an input in kernel. I am thinking about using the AES algorithm implemented in crypto.(Any other suggestions for an efficient algorithms that can be found in Linux crypto?) I've searched for guides o

& ldquo; Bad data & rdquo; CryptographicException

First, I have only written the code below for academic purposes. The reason I say this is because I am not putting this in a production environment, and therefor am "bypassing" some of the overhead that I would need to do if I was, I simply need

Is RSA encoded data exchangeable?

Up to now, I thought that if I have RSA-encrypted data, this data would be easily exchangable between most platforms (.net, java, pc, unix..), because of the commonly used algorithm. Through investigating for another questions I had, I'm now confused

Secure erasure of a directory

I know how to wipe a file in C# including it's sectors and such. But how do I overwrite the directories themselves? Example: @"C:\mydirectory\" must be unrecoverable gone forever (all files insides are already wiped) so that it will be impossibl

What are the vulnerabilities of MD5 and how can they be fixed?

Possible Duplicate: If MD5 is broken, what is a better solution? What are the vulnerabilities in MD5 and what are some of the remedies for it? Also, what ares some of the concerns that a non-technical person should have and what are some of the conce

Is it better to salt the chain when creating a secure hash?

I'm not really strong at cryptography, so there is my question. Our application - forum - sends our users notifications of new messages, if they opted for it. In the email there should be a link to unsubscribe from this messages. Now, I want that lin

network connection using public key cryptography

When A sends data to B over a network connection using public key cryptography, how does A achieve the goals of authentication, confidentiality ?In a case like this, A is using B's public key, and B is using A's. Confidentiality: If A encrypts someth

48-bit Blowfish

Is there an implementation (Java/C++/Ruby) of a Blowfish algorithm that supports 48-bit data blocks? I have an encryption problem where the input and output channels are exactly 48-bits. All implementations on the net are for 64-bit blocks.That's bec

RSA Encryption public key not returned from the container?

I feel like what I am trying to do is very simple. But for some reason it doesn't want to work: Here is a complete code snippet to test what I am trying to do: using System; using System.Xml; using System.Security.Cryptography; using System.Security.