Hack Forums
SecurePaste.net - AES encrypted paste and file hosting - Completely open source, too! - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141)
+---- Forum: Website Showcase and Reviews (https://hackforums.net/forumdisplay.php?fid=172)
+---- Thread: SecurePaste.net - AES encrypted paste and file hosting - Completely open source, too! (/showthread.php?tid=2864061)



SecurePaste.net - AES encrypted paste and file hosting - Completely open source, too! - observers.watch - Sep 14, 2012



Still working on the file storage. File encryption works right now, but I haven't put a page in for actually retreiving your uploaded files yet. Sorry, it'll be done in an hour or so and I'll edit the thread accordingly.

Also, if you're interested in the source of any page, click the "src?" down at the bottom. It's a quine, it prints it's own (unformatted, unfortunately) source. (Source will be formatted later with the GeSHi syntax highlighting library.)

Feel free to make any suggestions for new features that you'd like!

How paste storage/retrieval works:

Storage:
  1. User enters paste data, password, and Captcha

  2. Paste data is AES-256 encrypted with the user's provided password (done via PHPseclib)

  3. Encrypted data is converted to base64 (to solve compatibility issues with the characters that encrypted shit comes out as)

  4. Base64'd data is stored in a MySQL DB



Retrieval:
  1. User gets a link to a paste

  2. User enters a password

  3. If the password is correct, proceed. If not, they're shown an error.

  4. Base64 data is retrieved from database and converted into encrypted text

  5. Password is used to decrypt plaintext

  6. Plaintext is shown to user



How file storage/retrieval will work once fully implemented:

Storage:
  1. User enters a file, a password, and fills out a Captcha

  2. File is moved to an alternate directory and given a 32 character random name (file extension is kept in-tact)

  3. File's contents are read using file_get_contents(), then that data is encrypted with the provided password

  4. The data is converted into base64 (again, for compatibility reasons with MySQL)

  5. The data + some info about the file is stored in the MySQL DB for retrieval later



Retrieval:
  1. User is given a link to a file

  2. User enters password; if the password is correct, proceed to 3

  3. Data from MySQL DB is decoded and then decrypted with the pass the user provided

  4. Data is assembled into a file with a random name (but the appropriate extension)

  5. User is linked to that file

  6. 120 seconds after the download link is clicked, the file given to the user is deleted (But can be recreated again under a different name if the user enters the password again, of course)





* - GreyPhantom - Sep 19, 2012

A Chinese Website. :3
You are kidding right?


* - observers.watch - Sep 19, 2012

(Sep 19, 2012 02:12 AM)GreyPhantom Wrote:  A Chinese Website. :3
You are kidding right?

What are you talking about? Did you go to securepaste.com or something? Cause my site is securepaste.net.


* - GodlikeGuy - Sep 21, 2012

This is actually really good, I prefer 0bin though.


* - PhineasPhreak - Sep 21, 2012

Bookmarked but not really sure when I will ever need an encrypted paste.


* - badbrains - Sep 21, 2012

You should upgrade to MySQLi or PDO. MySQL 4 is outdated and soon to be removed from the PHP extensions.


* - observers.watch - Sep 25, 2012

Anybody got any other features they'd like to see on the site? I need something to do with my time.


* - Thanksgiving - Sep 25, 2012

Wait like the 2nd person to post said... a Chineese website really? lmfao!


* - observers.watch - Sep 28, 2012

Just overhauled several pages on the site, and added a full login and registration system with email verification! :D Site looks much better now.