Gibheer
f4f6429024
add go mod files
...
The source of this repository is now git.zero-knowledge.org/gibheer/pki
2022-08-15 22:36:25 +02:00
Gibheer
8726fcfa3a
make the test succeed
2022-08-15 22:36:04 +02:00
Gibheer
9fcfb1009c
fix upstream source of ed25519
...
Back when this file was created, ed25519 wasn't available as it is
today, 8 years later.
Now ed25519 is implemented in go directly, so use their work instead of
an upstream project that is now gone.
2022-08-15 22:35:00 +02:00
Gibheer
e95929ed26
Add ToPem() to public keys
...
This was missing before from all public keys.
2017-05-12 22:19:25 +02:00
Gibheer
b6c44317f5
add proper pem interface
...
This should finally resolve the completely broken and wrong API to get a
pem representation of a resource.
2017-05-12 15:27:44 +02:00
Gibheer
fd88bca287
fix result type
...
The returned type must be io.WriterTo to make it fit the Pemmer
interface.
2016-09-29 21:52:25 +02:00
Gibheer
2ad03c8f80
move certificate and certificate request to pemmer
...
This makes them use the Pemmer interface and therefore doesn't require
any weird control code to handle these two special cases.
2016-09-18 17:39:29 +02:00
Gibheer
f004403281
add ed25519 tests
...
This adds the tests for the ed25519 keys.
2015-07-12 17:48:37 +02:00
Gibheer
2cfb28a0ce
add ed25519 implementation
...
This adds the ed25519 implementation. It implements most of the API,
apart from three functions.
Both MarshalPem methods write the raw bytes to the channel instead of
exporting it into ASN.1. Maybe this needs to be fixed.
The PrivateKey() function does not return a crypto.PrivateKey at the
moment, as the ed25519 private key does not implement that interface.
2015-07-12 17:46:28 +02:00
Gibheer
edfac4e724
add support for signing for rsa
...
This adds finally support to sign and verify messages using an RSA
private and public key.
The method used is PKCS1v15, as it was the easiest to implement first.
There is also PSS available in go, so that could be implemented later.
2015-07-12 15:50:29 +02:00
Gibheer
19136823e1
implement rsa public key
...
This finally adds support for the rsa public key.
2015-07-11 07:48:10 +02:00
Gibheer
1fa31fbdee
add crl urls to the certificates
2015-04-01 21:17:42 +02:00
Gibheer
04899fd373
add extended key usage for certificates
2015-03-30 20:44:31 +02:00
Gibheer
301d931ad7
reformat everything with gofmt
...
Yes, I know that this will more or less destroy the history, but it had
to be done. I also adjusted my editor to use gofmt rules by default now.
2015-03-25 20:36:21 +01:00
Gibheer
b3f621a312
provide more documentation for certificate types
2015-03-25 20:29:10 +01:00
Gibheer
491630e33f
fix variable names for golint
2015-03-25 20:23:11 +01:00
Gibheer
afbc2e0dbf
refine documentation after report of golint
2015-03-25 20:20:04 +01:00
Gibheer
11423e25b5
fix go evt problem
...
Go vet reported a problem with the interface of WriteTo returning an
int.
Line 13: method WriteTo(stream io.Writer) (int, error)
should have signature WriteTo(io.Writer) (int64, error)
To fix that problem, the interface was changed to return io.WriterTo,
which uses int64 for return values.
2015-03-25 20:12:41 +01:00
Gibheer
a11b67a64e
add more flags to certificate options
...
This adds the IsCA and ca length options to define, if the resulting
certificate should be a CA.
2015-03-24 21:19:44 +01:00
Gibheer
6b355e272b
add more documentation to ecdsa
2015-03-16 21:25:01 +01:00
Gibheer
f9807c7ccb
add documentation
2015-03-16 21:12:03 +01:00
Gibheer
2c43111aec
Merge branch 'certificate'
...
This adds the API to generate certificates in the same way certificate
sign requests were built.
It works but still lacks some features and fields.
2015-03-16 17:11:28 +01:00
Gibheer
b7f4f3ae21
adjust comments on ecdsa a bit
2015-03-16 17:11:08 +01:00
Gibheer
2b74dbb334
implement marshal pem interface for certificates
2015-03-16 17:10:46 +01:00
Gibheer
362fe8ff38
finalize creation of a certificate
...
With the options it is now finished. The only stuff left to do is to add
all options provided by the go API. But this should be sufficient.
2015-03-16 16:48:42 +01:00
Gibheer
d4d2d4c09b
add certificate functionality
2015-03-15 21:38:04 +01:00
Gibheer
e0ec6b1bef
refine certificate sign request workings
2015-03-15 20:45:35 +01:00
Gibheer
09a8380b7a
first draft of a certificate system
2015-03-15 20:06:47 +01:00
Gibheer
4157d8e07a
make raw private key public
2015-03-15 20:06:09 +01:00
Gibheer
2fa7332719
add documentation to rsa functions
2015-02-19 21:50:07 +01:00
Gibheer
80db488cbd
add public key loader
...
This adds a way to restore a public key from any data source.
2015-02-19 21:48:08 +01:00
Gibheer
639a5379e9
add sign and verification to ecdsa
...
This commit adds support to sign and verify messages using ecdsa.
2015-02-18 22:55:29 +01:00
Gibheer
577538a5ff
add MarshalPem() to rsa public key
2015-02-18 21:55:43 +01:00
Gibheer
23f83f3c6e
add marshal test for public key
2015-02-18 21:55:29 +01:00
Gibheer
53be920308
add marshal support
2015-02-18 21:49:07 +01:00
Gibheer
018086528a
add proper comment for function
2015-02-18 21:37:36 +01:00
Gibheer
dfa8c8a384
add first batch of tests
2015-02-18 21:36:42 +01:00
Gibheer
67f850c9fb
add pem label for rsa
2015-02-18 21:36:32 +01:00
Gibheer
53327f7467
add pem support to public key
...
This adds pem support to public keys which can now be handled the same
way as private keys.
2015-02-17 21:43:21 +01:00
Gibheer
930035ce91
add authors file
2015-02-15 21:07:44 +01:00
Gibheer
1668a99b17
add license
2015-02-15 21:06:59 +01:00
Gibheer
f9164f3f99
initial commit for pki
...
pki is a small library to make building some of the crypto stuff easier
in go.
2015-02-15 21:04:59 +01:00