Skip to content

Commit 0cc4a3a

Browse files
authored
Merge pull request #13 from MicrochipTech/develop
Update with improvements
2 parents 40f0634 + dccd80c commit 0cc4a3a

File tree

462 files changed

+53128
-51663
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

462 files changed

+53128
-51663
lines changed

.gitmodules

Lines changed: 0 additions & 4 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 118 deletions
This file was deleted.

README.md

Lines changed: 65 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,81 @@
11

2-
#CryptoAuthentication OpenSSL Engine
2+
Configuration:
33

4-
##Overview
5-
This is an OpenSSL Engine implementation using ATECC508A for ECC key storage, ECDSA sign/verify, ECDH, and FIPS Random Number Generator
4+
Most of the configuration of the library can be done in lib/openssl/eccx08_engine.h or via defines during build
65

7-
The implementation integrates the [Atmel ATECC508A](http://www.atmel.com/devices/atecc508a.aspx) into the [OpenSSL ENGINE API](http://openssl.org/docs/manmaster/crypto/engine.html) to provide secure hardware key storage, [CAVP certified random numbers](http://csrc.nist.gov/groups/STM/cavp/documents/aes/aesval.html), P256 ECDSA & ECDH, and secure storage for data.
6+
The exception to this is in eccx08_platform.c where key slots are defaulted
87

9-
This project will integrate the key creation and import capabilities of the ATECC508A into the OpenSSL key creation and certificate creation process.
8+
If the ATCA_OPENSSL_ENGINE_STATIC_CONFIG define is set to 1 then device and signer certificate definitions will
9+
have to be linked into the library at build.
1010

11-
Also, secure key storage for RSA keys are implemented using the encrypted read/write feature of the ATECC508A.
11+
e.g. see the line in the makefile: #LIBATECCSSL_OBJECTS += cert_def_1_signer.c cert_def_2_signer.c
1212

13-
###Supported Cipher Suites
14-
Many ECDH(E)-ECDSA and ECDHE-RSA cipher suites are supported with the OpenSSL Engine for ATECC508A implementation.
1513

16-
Details for cipher suites can be found [here](https://github.com/AtmelCSO/cryptoauth-openssl-engine/wiki/Supported-Ciphers)
14+
Makfile:
1715

18-
##Download and Make
19-
Build instructions for Linux can be found on the Wiki pages associate with this project.
16+
The makefile included in this archive is fairly basic and is not what one would consider appropriate for a package
17+
so there is likely some manual configuration that would be needed at this stage
2018

21-
See: [Compile OpenSSL Engine for ATECC508A on Linux](https://github.com/AtmelCSO/cryptoauth-openssl-engine/wiki/Linux:-Compile-OpenSSL-Engine-for-ATECC508A)
2219

23-
##Platform Integration
24-
Follow the platform integration instructions found [here](https://github.com/AtmelCSO/cryptoauth-openssl-engine/wiki/Integrate-ATECC508A-onto-Your-Platform)
20+
To build the library:
2521

26-
##Unit Tests
27-
Unit testing is provided for both integration of the ATECC508A device and OpenSSL Examples.
28-
For details see:
29-
[Platform Integration Tests](https://github.com/AtmelCSO/cryptoauth-openssl-engine/wiki/ATECC508A-Integration-Tests)
30-
[OpenSSL Engine Tests & Examples](https://github.com/AtmelCSO/cryptoauth-openssl-engine/wiki/Tests-And-Examples)
22+
> make libateccssl
3123
32-
Source-Level Documentation
33-
Full Doxygen source-level documentation is provided.
34-
See: /docs/doxygen/html/index.html
24+
To run the test program:
3525

36-
##Web Server Setup
37-
The OpenSSL Engine for ATECC508A can also be configured.
38-
See Details [here](https://github.com/AtmelCSO/cryptoauth-openssl-engine/wiki/Web-Server-For-The-Web-Browser).
26+
> make test
3927
40-
##Wiki Topics:
41-
- [Linux Development Setup](https://github.com/AtmelCSO/cryptoauth-openssl-engine/wiki/Linux:-Development-Setup)
42-
- [Compiling on Linux](https://github.com/AtmelCSO/cryptoauth-openssl-engine/wiki/Linux:-Compile-OpenSSL-Engine-for-ATECC508A)
43-
- [Debugging on Linux](https://github.com/AtmelCSO/cryptoauth-openssl-engine/wiki/Linux:-Debugging)
44-
- [ATECC508A Integration](https://github.com/AtmelCSO/cryptoauth-openssl-engine/wiki/ATECC508A:-Platform-Integration)
45-
- [ATECC508A Certificate Provisioning](http://www.atmel.com/tools/at88ckeccroot-signer.aspx)
46-
- [Tests and Examples](https://github.com/AtmelCSO/cryptoauth-openssl-engine/wiki/Tests:-OpenSSL-Tests-and-Examples)
28+
To extract certificates (if the engine is added to the openssl.cnf file):
4729

30+
> openssl engine ateccx08 -t -post GET_DEVICE_CERT:./device.der
31+
> openssl engine ateccx08 -t -post GET_SIGNER_CERT:./signer.der
4832
33+
Otherwise you'll have to use an interactive openssl session (see openssl engine -h and engine -vvv for details)
34+
35+
> openssl
36+
37+
OpenSSL> engine dynamic -pre SO_PATH:/<full path to libeccssl.so> -pre LIST_ADD:1 -pre ID:ateccx08 -pre LOAD
38+
OpenSSL> engine ateccx08 -t -post GET_DEVICE_CERT:./device.der
39+
OpenSSL> engine ateccx08 -t -post GET_SIGNER_CERT:./signer.der
40+
41+
Then to verify the certs:
42+
> openssl x509 -in device.der -inform der -text -noout
43+
> openssl x509 -in signer.der -inform der -text -noout
44+
45+
To set up your openssl.cnf file
46+
47+
Find which openssl.cnf file your instance is using you can:
48+
49+
> openssl version -a | grep OPENSSLDIR
50+
OPENSSLDIR: "/usr/lib/ssl"
51+
52+
will tell you the base location where openssl is looking for the openssl.cnf file. It may be a symbolic link to another location
53+
54+
> ls -l /usr/lib/ssl
55+
lrwxrwxrwx 1 root root 14 Apr 24 15:22 certs -> /etc/ssl/certs
56+
lrwxrwxrwx 1 root root 20 Jan 31 05:53 openssl.cnf -> /etc/ssl/openssl.cnf
57+
58+
To set up the openssl.cnf to use the engine:
59+
60+
# At the top:
61+
62+
openssl_conf = openssl_init
63+
64+
# Append to the end:
65+
66+
[ openssl_init ]
67+
engines = engine_section
68+
69+
[ engine_section ]
70+
ateccx08 = ateccx08_config
71+
72+
[ ateccx08_config ]
73+
engine_id = ateccx08
74+
# Or if you sym link the libateccssl.so to the engine directory the next line is not needed
75+
dynamic_path = <full path to libateccssl.so>
76+
device_key_slot = 0
77+
init = 0
78+
79+
To use the engine in an application you can reference the openssl tests (test/openssl/test_engine.c) but the basic principle is that
80+
if the openssl.cnf file is configured correctly all an application really needs to do is add a call to OPENSSL_config if it is not already
81+
doing so and then to decide what functionality that the application wants and register it.

cmd

Lines changed: 0 additions & 35 deletions
This file was deleted.

cmd_openssl

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)