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

Pinned key types #21

Open
tel opened this issue Dec 14, 2012 · 2 comments
Open

Pinned key types #21

tel opened this issue Dec 14, 2012 · 2 comments

Comments

@tel
Copy link

tel commented Dec 14, 2012

Instead of using Bytestring to store keys a representation using Data.Vector.Storable is pinned in memory and never swapped making their use somewhat safer.

If this is a good fit I could write up a diff.

@thoughtpolice
Copy link
Owner

Sure. One thing to be aware of is that mlock(2) works on a page sized boundary. I am not sure how many private keys you would expect in a typical application, but a typical 4k to 8k for a single key is a bit wasteful. So you may want to manage that as you wish. I'd certainly accept a patch changing the underlying representation to storable, though.

See issue #10 (although it's pretty pie in the sky.)

@thoughtpolice
Copy link
Owner

Hm, also be aware that I'm currently working on changing the key types to be more parametric and type safe. The effects of this should mostly be localized, but I may or may not be done before you are, so just be aware (in the worst case I'll do the merge myself no matter what.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants