Commit graph

29 commits

Author SHA1 Message Date
Awn Umar
3ea58f31a7
remove clone; implement tests and repr methods 2019-05-26 19:08:26 +01:00
Awn Umar
61e6b4f8d7
feature: add clone and {move/copy}at methods 2019-05-17 14:22:12 +01:00
Awn Umar
5094398556
make buffer list private & modify slice type cast behaviour 2019-05-15 17:47:28 +01:00
Awn Umar
c0f33192a1
docs: write package documentation 2019-05-14 14:00:29 +01:00
Awn Umar
a684db30dc
Make data field unexported in core; use method instead 2019-05-13 02:45:54 +01:00
Awn Umar
c93b1b069c
patchset: some changes and streamlining
There are some known issues in this code at the moment and parts of the frontend API exist have not yet been stabalised or tested.
2019-05-01 18:13:17 +01:00
Awn Umar
8740253ea8
some improvements to errors 2019-03-21 22:28:44 +00:00
Awn
a49bd97f79
Encrypting secrets in memory (#73) 2018-06-30 21:16:18 +01:00
Awn
49bc077f52
breaking: rename container and buffer method (#67)
* Rename LockedBuffer to Enclave

* Rename container Buffer method to Bytes.
2018-06-18 17:27:14 +01:00
Awn
3f5a358670 immutability: redesign api to improve verbosity (#40)
* testing: simplify command

Go 1.9 no longer includes the vendor directory in wildcard commands, so we can remove the verbosity.

* docs: expand contributing guide

* docs: rewrite features list

* docs: remove example

The example for the New function is pretty much redundant.

* memcall: remove execute permissions

Related to #37. More refactoring needed.

* dependencies: update

* immutability: improve verbosity

This change changes the nomenclature and API used to improve verbosity and encourage better programming style.

* docs: improve docs summary

* api: rename EqualTo => EqualBytes

The new name is more clear about its intentions.

* patch: race condition

Use internal API to prevent mutex conflicts.

* docs: improve wording

* docs: fix outdated wording

* canary: minor optimisations

* destroy: refactor and optimise
2017-10-21 00:15:07 +01:00
Awn
44f4960542 Update documentation (#31)
* Add Buffer() method.

* Bring documentation up to date.

* Must remember godoc doesn't like markdown.

* Update documentation
2017-08-14 02:09:42 +05:00
Awn
4877ecde3f Add Buffer() method. 2017-08-14 00:13:21 +05:00
Awn
c893b946fc
Add example to New 2017-06-04 18:44:41 +01:00
Awn
18e20940b5 Use API call for MarkAsReadOnly (#16) 2017-06-04 15:25:59 +01:00
Awn
79d54e0bde Improve handling of kernel mlock limits (#14)
* Add note about kernel limits and encorage deferring.

* Add note to source code documentation.

* Expand error message on Unix

* Expand error message on Windows

* Remove specialised error messages.

* Simplify documentation.

* Improve error message slightly
2017-06-03 14:29:26 +01:00
Awn
33500a10db
Fix outdated documentation. 2017-05-31 15:35:21 +01:00
Awn
635edd4010
Minor rewording and syntax fixes. 2017-05-03 21:55:48 +01:00
Awn
66463af55d
Re-write the documentation. 2017-05-01 12:57:46 +01:00
Awn
9403bb0ec5
Reword docs. 2017-05-01 01:54:38 +01:00
Awn
e212030df2 v0.2.0 - Manage memory manually and implement new API (#5)
* Added wrapper for Unix's Mprotect

* Panic on failed Lock

* Replaced Mlock code with libsodium counterpart

* Replaced pkg-config with LDFLAG

* Install libsodium as a dependency

* Install libsodium as a dependency, properly

* Install libsodium as a dependency, third time lucky

* Auto-confirm prompts

* Attain super-user before installing

* Install libsodium from tarball instead

* sudo su feezes the conatiner

* Build libsodium in /tmp/

* Really?

* Extract libsodium to tmp

* Temporary change to attain original working directory

* Switch back to working directory after installing libsodium

* Install from apt

* Install from apt, with confirmation

* Install from apt, with more confirmation

* Fix OSX tests too

* cgo is overkill

* Fix tests

* import golang.org/x/sys/windows

* This shouldn't return anything

* Implemented all of the required syscalls on both Unix and Windows

* Update local dependencies

* OSX doesn't support all the functions

* commas are AND

* Fix syntax errors in Windows

* Make Protect function partable

* Implement the front-facing API

* Basic tests

* Guard Pages added and bug fixes

* VirtualFree fix

* Formatting updates and fix windows tests

* Try again fixing windows tests

* Revert changes to Alloc in windows

* Updated a lot. Refactored a lot. Fixed a lot.

* Finishing up

* Added basic test structure. Removed useless calculation.

* Added some tests

* Add CSPRNG for the upcoming canary

* Fix some errors. Write more tests.

* Greater consistency in variable names.

* Test fix on windows.

* Nope

* Switch back to using slices

* Add canarys to detect buffer underflows

* Use global canary instead of individual ones

* Fix tests

* Add Locking functionality back

* Cleanup after tests

* Debugging for windows

* Remove debugging on windows

* Unlock the data pages specifically when destroying

* Fixed nasty bug. Credits to @dotcppfile for spotting it.

* Fixed nasty bug. Credits to @dotcppfile for spotting it.

* Update documentation

* Improve efficiency of DestroyAll. Credits to @dotcppfile

* Add small comment on what the setup protects against.

* Remove notice.

* Update documentation and add PROT_EXEC on Unix.

* Add PROT_EXEC on Unix.

* Remove Lock()

* CatchInterrupt() now can accept a function

* Use pointer arithmetic instead of storing a copy. Full credits to @dotcppfile

* Add authors file

* Add a State field to store the current protection value of the Buffer

* Fix some comments and simplify _getBytes function

* Reword parts of README.md

* Remove leftover Test from removed function

* Keep contributions concise.

* Update pass on dependencies.

* Reword AUTHORS file.

* WriteOnly isn't supported on windows, and isn't useful. Remove it.

* Protect should return nothing on all systems for compatibility.

* Remove outdated references to Locking from comments.

* Remove reference to removed feature from README

* Added array instructions to documentation.

* Add Mutex lock to make MemGuard threadsafe.

* Add note about thread-safety in MemGuard.

* Add proper thread-safety to the API.

* Improved mutexing on Destroy functions

* Improved comments and some code.

* Improved more comments. Added a test.
2017-05-01 01:50:48 +01:00
Awn
448f8f2c85
Reword more documantation 2017-04-22 18:25:21 +01:00
Awn
5cdcfec076
Reword documentation 2017-04-22 18:23:56 +01:00
Awn
0631ff958f
Remove useless comment. 2017-04-22 18:17:56 +01:00
Awn
7bea817d2a
Renamed MakeProtected to Make. Added CatchInterrupt function. 2017-04-22 18:17:15 +01:00
Awn
34508225e1
Update documentation 2017-04-22 14:04:12 +01:00
Awn
bb6b298f89
Fix typo 2017-04-22 09:49:53 +01:00
Awn
a447a41103
Update documentation 2017-04-22 09:47:35 +01:00
Awn
1a2d1c3ef5
Fix documentation 2017-04-22 09:44:28 +01:00
Awn
cbad480592
Add documentation 2017-04-22 09:42:39 +01:00