diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/ca.cpp | 2 | ||||
-rw-r--r-- | doc/examples/cpuid.cpp | 29 | ||||
-rw-r--r-- | doc/examples/gen_certs.cpp | 6 | ||||
-rw-r--r-- | doc/examples/pkcs10.cpp | 2 | ||||
-rw-r--r-- | doc/examples/self_sig.cpp | 3 | ||||
-rw-r--r-- | doc/log.txt | 3 | ||||
-rw-r--r-- | doc/thanks.txt | 7 |
7 files changed, 34 insertions, 18 deletions
diff --git a/doc/examples/ca.cpp b/doc/examples/ca.cpp index 41dd409d5..9195be418 100644 --- a/doc/examples/ca.cpp +++ b/doc/examples/ca.cpp @@ -47,7 +47,7 @@ int main(int argc, char* argv[]) PKCS8::load_key(arg_ca_key, rng, arg_passphrase) ); - X509_CA ca(ca_cert, *privkey); + X509_CA ca(ca_cert, *privkey, "SHA-256"); // got a request PKCS10_Request req(arg_req_file); diff --git a/doc/examples/cpuid.cpp b/doc/examples/cpuid.cpp index 1bdee787c..76438783f 100644 --- a/doc/examples/cpuid.cpp +++ b/doc/examples/cpuid.cpp @@ -1,17 +1,28 @@ -#include <stdio.h> - +#include <iostream> #include <botan/cpuid.h> using namespace Botan; +void print_if_feature(const std::string& feature_name, bool exists) + { + if(exists) + std::cout << feature_name << '\n'; + else + std::cout << '[' << feature_name << ']' << '\n'; + } + int main() { - printf("Cache line size: %d\n", CPUID::cache_line_size()); - printf("RDTSC: %d\n", CPUID::has_rdtsc()); - printf("SSE2 %d\n", CPUID::has_sse2()); - printf("SSSE3 %d\n", CPUID::has_ssse3()); - printf("SSE41 %d\n", CPUID::has_sse41()); - printf("SSE42 %d\n", CPUID::has_sse42()); + std::cout << "Cache line size = " << CPUID::cache_line_size() << "\n"; + + print_if_feature("RDTSC", CPUID::has_rdtsc()); + print_if_feature("SSE2", CPUID::has_sse2()); + print_if_feature("SSSE3", CPUID::has_ssse3()); + print_if_feature("SSE4.1", CPUID::has_sse41()); + print_if_feature("SSE4.2", CPUID::has_sse42()); + + print_if_feature("AES-NI", CPUID::has_aes_intel()); + print_if_feature("AES-VIA", CPUID::has_aes_via()); - printf("AltiVec %d\n", CPUID::has_altivec()); + print_if_feature("AltiVec", CPUID::has_altivec()); } diff --git a/doc/examples/gen_certs.cpp b/doc/examples/gen_certs.cpp index f635e1ccf..90cb80038 100644 --- a/doc/examples/gen_certs.cpp +++ b/doc/examples/gen_certs.cpp @@ -34,7 +34,7 @@ X509_Certificate make_ca_cert(RandomNumberGenerator& rng, opts.end = later; opts.CA_key(); - return X509::create_self_signed_cert(opts, priv_key, rng); + return X509::create_self_signed_cert(opts, priv_key, "SHA-256", rng); } PKCS10_Request make_server_cert_req(const Private_Key& key, @@ -47,7 +47,7 @@ PKCS10_Request make_server_cert_req(const Private_Key& key, opts.add_ex_constraint("PKIX.ServerAuth"); - return X509::create_cert_req(opts, key, rng); + return X509::create_cert_req(opts, key, "SHA-1", rng); } void save_pair(const std::string& name, @@ -92,7 +92,7 @@ int main() save_pair("ca", ca_password, ca_cert, ca_key, rng); - X509_CA ca(ca_cert, ca_key); + X509_CA ca(ca_cert, ca_key, "SHA-256"); RSA_PrivateKey httpd_key(rng, 1536); X509_Certificate httpd_cert = ca.sign_request( diff --git a/doc/examples/pkcs10.cpp b/doc/examples/pkcs10.cpp index d719baf72..d9fa9accb 100644 --- a/doc/examples/pkcs10.cpp +++ b/doc/examples/pkcs10.cpp @@ -59,7 +59,7 @@ int main(int argc, char* argv[]) opts.xmpp = "[email protected]"; - PKCS10_Request req = X509::create_cert_req(opts, priv_key, rng); + PKCS10_Request req = X509::create_cert_req(opts, priv_key, "SHA-1", rng); std::ofstream req_file("req.pem"); req_file << req.PEM_encode(); diff --git a/doc/examples/self_sig.cpp b/doc/examples/self_sig.cpp index 0bf17e3bc..93161f7d2 100644 --- a/doc/examples/self_sig.cpp +++ b/doc/examples/self_sig.cpp @@ -64,7 +64,8 @@ int main(int argc, char* argv[]) if(do_CA) opts.CA_key(); - X509_Certificate cert = X509::create_self_signed_cert(opts, key, rng); + X509_Certificate cert = + X509::create_self_signed_cert(opts, key, "SHA-256", rng); std::ofstream cert_file("cert.pem"); cert_file << cert.PEM_encode(); diff --git a/doc/log.txt b/doc/log.txt index 75fde9a5f..e788aa8c9 100644 --- a/doc/log.txt +++ b/doc/log.txt @@ -1,5 +1,8 @@ * 1.9.3-dev, ????-??-?? + - Add new AES implementation using Intel's AES instruction intrinsics + - Allow use of any hash function in X.509 certificate creation + - Optimizations for MARS, Skipjack, and AES - Set macros for available SIMD instructions in build.h * 1.9.2, 2009-11-03 diff --git a/doc/thanks.txt b/doc/thanks.txt index caa2fb538..def96a16a 100644 --- a/doc/thanks.txt +++ b/doc/thanks.txt @@ -23,9 +23,10 @@ has provided financial assistance to the project. Barry Kavanagh of AEP Systems Ltd kindly provided an AEP2000 crypto card and drivers, enabling the creation of Botan's AEP engine module. -In addition, the following people have unknowingly contributed help: +In addition, the following people have unknowingly contributed help +via public domain code which has been repurposed into the library: - Dean Gaudet <[email protected]> wrote the SSE2 implementation of SHA-1 + Dean Gaudet wrote the SSE2 implementation of SHA-1 The implementation of DES is based off a public domain implementation by Phil Karn from 1994 (he, in turn, credits Richard Outerbridge and Jim Gillogly). @@ -42,7 +43,7 @@ In addition, the following people have unknowingly contributed help: Some of the hash functions (MD5, SHA-1, etc) use an optimized implementation of one of the boolean functions, which was discovered by Colin Plumb. - The design of Randpool takes some of it's design principles from those + The design of Randpool takes some of its design principles from those suggested by Eric A. Young in his SSLeay documentation, Peter Gutmann's paper "Software Generation of Practically Strong Random Numbers", and the paper "Cryptanalytic Attacks on Pseudorandom Number Generators", by Kelsey, |