Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple changes #81

Merged
merged 96 commits into from
Jun 3, 2019
Merged

Multiple changes #81

merged 96 commits into from
Jun 3, 2019

Conversation

awnumar
Copy link
Owner

@awnumar awnumar commented Mar 22, 2019

  • Refactoring of functionality into core package.
  • Addition of Enclave objects which store encrypted data.
  • Rewrite of signals handling. Should make implementing further data catching much easier.
  • Rewrite and simplification of the API.
  • Addition of examples package.
  • Patched data races in interrupt handling functionality.
  • Conceal mapped memory from core dumps on OpenBSD.
  • Additional functionality added such as safe panicking.
  • Disable core dumps by default. Users that want them can enable themselves.
  • Use local entropy pool for fast random bytes reading.
  • Use a variable sized canary value with 32 <= len(canary) <= ~pagesize.
  • Other optimisations and improvements.
  • ...

Awn and others added 30 commits April 29, 2018 14:53
The drawbacks outweighed the pros.

Also, #59 has been modified given developments in the Go compiler.
* Rename LockedBuffer to Enclave

* Rename container Buffer method to Bytes.
* Add resizing methods.

* Resizing methods are redundant. Keep functions.
…es and improvements. Todo: re-write frontend
…unctionality in frontend

Still need to write tests.
@awnumar
Copy link
Owner Author

awnumar commented May 17, 2019

An important little change that was slipped in 61e6b4f is that NewBuffer returns a mutable container whereas NewBufferFromBytes and NewBufferRandom return immutable ones. Also Enclaves decrypt to immutable LockedBuffers.

@awnumar
Copy link
Owner Author

awnumar commented May 30, 2019

I'm tentatively considering this ready to merge. Eyes on the code would be appreciated.

@capnspacehook
Copy link
Contributor

I can take a look at all the changes this weekend

@capnspacehook
Copy link
Contributor

Any reason you removed clone and resize?

@awnumar
Copy link
Owner Author

awnumar commented May 30, 2019

Clone was removed because of API bloat and I don't want to encourage the duplication of sensitive information. It's fairly easy to recreate its functionality:

b := NewBuffer(8)
c := NewBuffer(b.Size())
c.Copy(b.Bytes())
c.Freeze() // optional

Resize required some important decisions to be made regarding mutability and data, decisions that the programmer should probably make themselves. Again the functionality is easy to recreate:

b := NewBuffer(8)
c := NewBuffer(new_size)
c.Copy(b.Bytes())
b.Destroy()

I'm thinking of a way to implement streaming into and out of Enclaves which should reduce the need for Resize. (Resize was posed as a solution to #68 originally.)

Do you consider these to be necessary components of the API?

@capnspacehook
Copy link
Contributor

I don't consider Clone or Resize to be necessary at all, the reasons you have for removing them are very good ones I think. I was just curious about your reasoning.

I do think while I wouldn't consider it essential, streaming would be nice to have.

Repository owner deleted a comment May 31, 2019
Repository owner deleted a comment May 31, 2019
Repository owner deleted a comment May 31, 2019
@awnumar awnumar merged commit 0799fe7 into master Jun 3, 2019
@awnumar awnumar deleted the development branch June 3, 2019 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants