Commit Graph

53 Commits

Author SHA1 Message Date
Kyle
4e4ac735ef Add ECCRecord support to keycache.
This commit adds ECC cases to functions checking for RSA records.
Additionally, the rsaEncryptedKey variable is changed to pubEncryptedKey
to reflect a general use of public key crypto.
2014-01-09 19:22:09 -07:00
Kyle
db0b10e671 Add ECC support to cryptor.
There are a few changes made here:
  * Comments have been updated to reflect the presence of ECC records.
  * Variables named rsa* have been renamed pub* to reflect the general
    use of public key cryptography, instead of RSA specifically.
  * An if statement for RSA keys now handles both RSA and ECC keys.
2014-01-09 19:20:06 -07:00
Kyle
5ea44c0ffb Add ECC support to passvault.
This adds code to handle ECC records; the RSA code remains intact.
While old password records are not affected, new records use ECC. Due to
the use of public keys to encrypt a KEK that is then used to encrypt
data, there is no visible change to end users. A user with an RSA key
can interact and share a secret with a user who has an ECC key.

The bulk of this commit simply adds cases for handling EC records.
2014-01-09 19:18:16 -07:00
Kyle
689f0e6fdc Add ECDH package.
The package encrypts data using ECDHE with AES-128-CBC-HMAC-SHA1;
this matches the other components. The curve used is P256 to match
the use of AES-128. The Go ECDSA package is used; no signatures are
done, but it presents usable PublicKey and PrivateKey types that are
useful for this system.
2014-01-09 19:16:02 -07:00
Kyle
c0d375d4bf Begin adding ECDSA support. 2014-01-09 06:53:48 -07:00
Nick Sullivan
f0b03d58b7 Update README.md
Fix issue #20
2013-11-27 17:58:00 -08:00
Nick Sullivan
f37bb41abd Merge pull request #19 from grittygrease/32bit-compatible
Fix passvault on 32-bit systems
2013-11-27 10:58:45 -08:00
Nick Sullivan
8cc69edefe Fix passvault on 32-bit systems
The passvault's id is created with math.rand as a native int.
If the vault is created on a 64-bit system, it breaks compatibility
with 32-bit systems.

- Generate vaults with 32-bit ids.
- Update testcode
2013-11-27 10:55:24 -08:00
Albert Strasheim
056cc550df Add travis-ci build status to README. 2013-11-27 07:58:58 -08:00
Albert Strasheim
60a1cf5bd4 Merge pull request #18 from cloudflare/alberts/travis-ci
Added travis-ci configuration file.
2013-11-27 07:57:21 -08:00
Albert Strasheim
3d90b62ea9 Added travis-ci configuration file. 2013-11-27 07:53:59 -08:00
Nick Sullivan
7e9a8d64cf Merge pull request #17 from cloudflare/govet-testcode
Govet testcode
2013-11-26 12:20:19 -08:00
Nick Sullivan
0dc73c5c3a Merge pull request #1 from grittygrease/govet-testcode
Make testcode play nice with go vet
2013-11-26 12:17:33 -08:00
Nick Sullivan
669d7279c2 Make testcode play nice with go vet 2013-11-26 12:15:37 -08:00
Albert Strasheim
bd1c3db2d2 Merge pull request #16 from cloudflare/alberts/droneio
Add drone.io build status.
2013-11-26 11:53:15 -08:00
Albert Strasheim
c570a1f456 Add drone.io build status. 2013-11-26 11:49:53 -08:00
Albert Strasheim
9a5e256780 Merge pull request #15 from cloudflare/alberts/issue14
Tweak error returns to work with older Go. Fixes #14
2013-11-26 11:38:40 -08:00
Albert Strasheim
984f95ae17 Tweak error returns to work with older Go.
Fixes #14
2013-11-26 11:34:16 -08:00
John Graham-Cumming
3bb2a1f2b0 Merge pull request #13 from majek/fix_default_vault_location
By default vault should not be stored in /tmp!
2013-11-26 07:07:12 -08:00
John Graham-Cumming
5e00bad1ed Merge pull request #11 from majek/better_readme2
Rewritten readme
2013-11-26 07:06:31 -08:00
Marek Majkowski
15f4b5bc80 By default vault should not be stored in /tmp! 2013-11-26 06:37:14 -08:00
Marek Majkowski
dd83f1e970 Rewritten readme 2013-11-26 06:31:32 -08:00
John Graham-Cumming
455df346bc Merge pull request #10 from toekneestuck/ui
Added index.html as an example management UI
2013-11-26 01:46:17 -08:00
Tony Stuck
c9f55e42c7 Added index.html as an example UI to manage the Red October service 2013-11-25 20:13:07 -08:00
Nick Sullivan
f5789348de Add basic checking to username and password. 2013-11-25 11:10:51 -08:00
Nick Sullivan
9d6751ae76 Merge pull request #8 from majek/static_vs_staticpath
Documentation says about "-static" flag, not "-staticpath"
2013-11-25 07:58:32 -08:00
Nick Sullivan
4c5cb0ea9c Merge pull request #9 from majek/consistent_http_port
Consistent http port
2013-11-25 07:58:13 -08:00
Marek Majkowski
59c4fb135a Be consistent about port number, 8080 not 8000 2013-11-25 07:49:19 -08:00
Marek Majkowski
94d2bcc18f Documentation says about "-static" flag, not "-staticpath" 2013-11-25 07:12:19 -08:00
John Graham-Cumming
3be7cc32b6 Merge pull request #6 from jdiez17/master
Reformatted JSON examples, fixed Markdown
2013-11-22 06:51:07 -08:00
José Manuel Díez
f5c77700dd Added newlines to README.md to show examples as code blocks 2013-11-22 13:52:01 +00:00
José Manuel Díez
16db488ea4 Fix markdown in README (tabs -> spaces) 2013-11-22 13:49:16 +00:00
John Graham-Cumming
7a536a5721 Merge pull request #5 from djolivier/master
Fix typo on line 110, decryped -> decrypted.
2013-11-22 04:48:52 -08:00
Darren Olivier
af28e0cb49 Fix typo on line 110, decryped -> decrypted. 2013-11-22 14:32:00 +02:00
grittygrease
55f36c9d6a Update README.md
Update build and install instructions to use go get.
2013-11-21 12:26:54 -08:00
Albert Strasheim
576e326208 Merge pull request #4 from alberts/master
Make repository work with go get
2013-11-21 12:17:15 -08:00
Albert Strasheim
9c5d08f665 Make repository work with go get 2013-11-21 12:01:25 -08:00
dknecht
5f328bb7a3 update makefile to work in CloudFlare build system 2013-11-21 08:42:54 -08:00
Nick Sullivan
be1faea688 Add cf-package target. 2013-11-21 08:23:43 -08:00
Nick Sullivan
9c2cf08409 Add external dependency to makefile. 2013-11-21 08:20:49 -08:00
Nick Sullivan
d7d64a0c6b Small changes
The string used for selecting the transaction type should
be copied because it is passed by reference.

Augment HMAC to validate entire decryption request

All the valued fields need to be hashed for incoming
encrypted file.  This is to keep the integrity of the
request.

Add static test case for core

Test the output of a pre-computed encrypted blob with associated
vault.

Support hosting static file under /index

Require client auth only when server CA present

Add tests for cryptor.go

Improve comments.
2013-11-20 17:51:20 -08:00
grittygrease
a0516a473a Merge pull request #3 from jgrahamc/master
Fix bug in makeRandom and do some more general code clean up
2013-11-20 09:27:31 -08:00
John Graham-Cumming
aa1365eb1b Fix bug in makeRandom and do some more general code clean up
The makeRandom() function was ignoring its argument and always returning 16
bytes of random data (this didn't matter because it was only ever called with
16 as its argument).

Take another look at this file and perform general clean up of comments and
go style.

Spotted another small bug where an error was set using

  err = errors.New()

but there was no return statement so the error was ignored.
2013-11-20 09:21:14 -08:00
grittygrease
61cb0542fb Merge pull request #2 from jgrahamc/master
Fix small problem that occurred when merging from upstream
2013-11-20 08:55:33 -08:00
John Graham-Cumming
a3307c097b Fix small problem that occurred when merging from upstream 2013-11-20 08:53:14 -08:00
Nick Sullivan
aeb6aa26ec Merge branch 'master' of https://github.com/jgrahamc/redoctober
Conflicts:
	src/redoctober/core/core_test.go
	src/redoctober/passvault/passvault_test.go
2013-11-20 08:32:11 -08:00
John Graham-Cumming
ab19d6a5cb First time a second set of eyes has looked at the code
The major work here has been:

1. Clean up some go idioms to make the code more idiomatic and simplify
   functions where possible to minimize number of lines where there was
   unnecessary code.

2. Document as many of the functions and packages as possible.

3. Add a test suite for the padding package.

4. Force 'go fmt' when 'make' is performed.

5. Better handling of errors throughout the code. There were quite a few
   that were ignored, now they are handled and reported on (e.g. if the
   JSON in the password vault is broken it will no longer be ignored, etc.)

6. Changed the names of a number of functions to make them clearer.

The code could now do with someone who knows it well to go through and
document everything clearly for release.
2013-11-19 19:27:19 -08:00
Nick Sullivan
e9a2f77007 Update command line call for redoctober 2013-11-19 17:53:12 -08:00
Nick Sullivan
afda151f08 Add real test cases for passvault. 2013-11-19 14:51:37 -08:00
Nick Sullivan
897abdfb59 Use the correct testing framework and JSON. 2013-11-19 09:56:38 -08:00