• 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Plugin] samp-crypto - bcrypt, scrypt & argon2 hashing
#1
samp crypto
A SAMP cryptography plugin written in Rust. This plugin was written as a means to make it really simple for anyone to transition from Whirlpool, SHA256_PassHash or any other hashing method similar to these without major script changes, like the other bcrypt plugins do. This is my first plugin written in Rust, I tried cleaning up all my code and I will continue to do so however you may still see some older code. If you wish to clean it up please fork the repo, make changes and create a PR! I will happily review and accept it.
[Image: total.svg] [Image: samp-crypto.svg] [Image: samp-crypto.svg]

Encryption Methods
  • Bcrypt
  • Scrypt
  • Argon2i (Argon2d and 2id will be brought out soon if demand is there)
Installation
  • Head to the release page and download the latest version of samp crypto (https://github.com/infin1tyy/samp-crypto/releases).

  • Place the .inc into your pawno/include folder.

  • Place the .dll or .so in your plugins folder (if one doesn't exist, create a new one).

  • Add?samp_crypto?to your server.cfg (if on linux, add?libsamp_crypto.so?to your server.cfg instead.

  • Enjoy!
How to Use
Click me to go to the wiki!

Downloads
Binaries
Source Code

Credits
The credits can be found?here, in the GitHub README.md

Notes
I was debating whether or not I should release this for a while. After what has been going on in SAMP, with essentially the community being divided between the players in the Discord and the SAMP forum, I wasn't sure who to support. A lot of the people from this community have been quite spiteful towards me, however, I'm putting that in the past and I suppose my support is with you lot.
samp crypto will be a burgershot.gg exclusive.
Special thanks to iAmir & Dakyskye from the bottom of my heart.
For anyone who didn't believe in me, fuck you I suppose. :joy: Maybe this'll prove I'm worth something. And I'd like to apologize for never delivering on that Postgres plugin, but do know that I still have it in mind and I'll make it happen whenever I have the experience to do so.
  Reply
#2
I would like to say.... Great plugin! I am planning to use this in my rp project. Great job <3




  Reply
#3
Been waiting for the release since day 1. Very useful, thank you.
  Reply
#4
Amazing one. Good job.
  Reply
#5
Great plugin, I'm gonna definetely?use it.
@dakyskye everywhere
  Reply
#6
Thank you all :)
  Reply
#7
The old BCrypt plugin used a callback architecture. You requested a hash, and once it was done the plugin informed you. This was because cryptographic hashes are meant to be slow. Their security lies in the fact that they take a long time to calculate, making brute-forcing them impossible within the age of the universe. Performing the hash synchronously as in this version would stall the server for a non-trivial amount of time while running the calculation. I like the presence of multiple different hashes, but this should really be threaded.
  Reply
#8
(2019-04-15, 11:12 PM)Y_Less Wrote: The old BCrypt plugin used a callback architecture. ?You requested a hash, and once it was done the plugin informed you. ?This was because cryptographic hashes are meant to be slow. ?Their security lies in the fact that they take a long time to calculate, making brute-forcing them impossible within the age of the universe. ?Performing the hash synchronously as in this version would stall the server for a non-trivial amount of time while running the calculation. ?I like the presence of multiple different hashes, but this should really be threaded.



Threading has been suggested to me before, I just never got around to doing it. Argon2 already has threading (in the form of lanes? idk, you'll have to check out the rust-argon2 crate) so that's probably the best to use. I'll look into doing this, and if anyone decides they want to make a PR why not :)

Also I do know that it did use a callback architecture, and if anyone prefers that you've always got SyS' bcrypt plugin, and that's still being maintained as is this plugin. This is just meant to be a drop-in replacement for 'legacy' hashing methods (SHA256_PassHash, Whirlpool, MD5, etc).
  Reply


Forum Jump: