[drupal-devel] OpenId-compatible encryption in PHP

Steven Wittens steven at acko.net
Sun May 22 14:50:16 UTC 2005


> Some of the technologies used by OpenId (or under consideration):
>  DSA encryption (using PEM key formatting)
>  RSA encryption (under consideration)
>  SHA1 encryption
>  DER encoding
>  BASE64 encoding
>
> I'm vaguely familiar with many of these technologies, and have even 
> used several of them. SHA1 is natively supported by PHP >= 4.3.0.
> BASE64 is natively supported by PHP

You're mixing many things here.

BASE64 is a way to encode binary data as ascii. It is not an encryption 
algorithm in any way.

SHA1 is a hash function. It calculates a fixed-length checksum from a 
variable-length input. Other popular hashes include MD5 (what we use for 
passwords).

I don't know DER, but googling shows it is a file format for digital 
certificates.

RSA is a public/private key based encryption system, mostly used for 
signatures with a fixed length. Using it for general encryption is not 
as practical, but possible.

DSA is also a public/private key based encryption system, but afaik it 
can only be used for signatures.

Steven Wittens



More information about the drupal-devel mailing list