Commit Graph

19 Commits

Author SHA1 Message Date
Piotr Lizonczyk
2e85d7527b Multiple improvements, fixing HandshakeState logic
noise/functions.py
* Moved dh, cipher and hash maps from noise_protocol.py
* Provisioned DH, Cipher, Hash classes
* Provisioned key public key derivation in KeyPair class

noise/state.py
* Fixed buggy logic for getting appropriate keys when parsing
pre-messages

tests/test_vectors.py
* Updated tests to reflect what we have already and prepare for next
failing additions (TDD-ish)
2017-08-14 12:05:09 +02:00
Piotr Lizonczyk
1164c4cabe Switching string formatting for python3.5 compat 2017-08-12 19:24:31 +02:00
Piotr Lizonczyk
bcaceb9ccd Improvements to initialization of NoiseProtocol
noise/noise_protocol.py
* Added validation of given function names vs available crypto methods
* Members of NoiseProtocol should now refer to proper classes/methods
after initialization of an instance

noise/patterns.py
* Added method for application of pattern modifiers

noise/crypto.py
* Provisioned ed448 function

noise/state.py
* Changed references to NoiseProtocol instances to make it more
consistent throughout the code
2017-08-12 13:30:44 +02:00
Piotr Lizonczyk
de73505ac3 Implementing NoiseProtocol (WIP), binding crypto
noise/noise_protocol.py - added maps of cryptofunctions that will be
used, finished protocol name splitting

noise/patterns.py - added map of patterns

requirements.txt - switching to pycryptodome as a source of cipher and
hashing functions, and ed25519 package for that curve
2017-08-09 23:55:32 +02:00
Piotr Lizonczyk
5cb448369c Removing rev30 tests, replacing with rev32
tests/vectors/Noise* - removed, as they are incompatible with current
revision

tests/vectors/cacophony.txt - added from Cacophony repository

tests/test_vectors.py - updated with currently implemented functionality
2017-08-09 23:51:39 +02:00
Piotr Lizonczyk
a6eec85ef7 Implemented HandshakeState.initialize()
constants.py
* Adding max Noise protocol name constant

noise_protocol.py
* Provisioning NoiseProtocol and KeyPair classes

patterns.py
* Switching to proper intra-package relative imports
* Adding getter functions for pre-messages

state.py
* Switching to proper intra-package relative imports
* Removed __init__ of HandshakeState, leaving only initialize() as
constructor function.
* Implemented initialize() along with helper functions for retrieving
keypairs
* Modified SymmetricState, removing __init__ and leaving
initialize_symmetric as a constructor function (only provisioned)
2017-08-07 00:50:45 +02:00
Piotr Lizonczyk
19e78f1583 Moving tests outside main package directory 2017-08-06 21:32:30 +02:00
Piotr Lizonczyk
fd95788672 Adding readme files to examples 2017-08-06 21:29:10 +02:00
Piotr Lizonczyk
611c456d5e Moving example related files from noise directory 2017-08-06 21:29:10 +02:00
Piotr Lizonczyk
bf36429fd7 * Adding handshake patterns
* Adding token constants for handshake patterns
2017-08-06 21:29:10 +02:00
Piotr Lizończyk
b7b9e29c27 Adding setup.py contents and README placeholder 2017-08-06 21:29:10 +02:00
Piotr Lizonczyk
7f0f6fb417 .travis.yml modification (no email notifications, add folding) 2017-08-06 21:29:10 +02:00
Piotr Lizonczyk
8cddef8ae5 Moving echo-script related code into suitable directory
Adding Empty class and switching some Nones to it where required by specification
Some additions to CipherState
2017-08-06 21:29:10 +02:00
Piotr Lizonczyk
2bfc10e080 Adding test vectors from reference implementation (noise-c)
Configuration for travis with pytest
Basic (failing) test for each vector
2017-08-06 21:29:10 +02:00
Piotr Lizonczyk
2c61f2bb86 State objects provisioned with appropriate methods 2017-08-06 21:29:10 +02:00
Piotr Lizonczyk
7a998277ea Adding pynacl to requirements
Adding noise-c echo-like script
2017-08-06 21:28:58 +02:00
Piotr Lizonczyk
4c77b8abdb Add example keys
Add python3.6 to travis
Provision directories
2017-08-06 21:28:22 +02:00
Piotr Lizończyk
60b1bae3cb Travis config provisioned 2016-10-11 14:20:09 +02:00
Piotr Lizończyk
0a796cfdfe Requirements and gitignore 2016-02-18 18:30:47 +01:00