The next generation of the Teknik Services. Written in ASP.NET.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Upload.cshtml 3.3KB

  1. @model Teknik.Areas.Help.ViewModels.HelpViewModel
  2. @using Teknik.Utilities
  3. <div class="container">
  4. <ol class="breadcrumb">
  5. <li><a href="@Url.SubRouteUrl("help", "Help.Index")">Help Index</a></li>
  6. <li class="active"><a href="#">Uploads</a></li>
  7. </ol>
  8. <div class="row">
  9. <div class="col-sm-10 col-sm-offset-1">
  10. <h2 class="text-center"><b>Uploads</b></h2>
  11. <hr>
  12. <h3>Encryption Method</h3>
  13. <br />
  14. <h4>Using the Browser (Client Side Encryption)</h4>
  15. <p>
  16. When you using the web interface for uploads, the file is loaded using the javascript <a href="">FileReader</a> API.
  17. </p>
  18. <p>
  19. Once the file is completely loaded into the buffer, a key and iv are generated by a random string generator to create a key that is <b>@Model.Config.UploadConfig.KeySize Bits</b> and an iv (Block Size) that is <b>@Model.Config.UploadConfig.BlockSize Bits</b>.
  20. Then the file buffer, key, and iv are passed into a Web Worker for encryption.
  21. </p>
  22. <p>
  23. The file data is passed through a progressive ciphering with a chunk size of <b>@Model.Config.UploadConfig.ChunkSize Bytes</b>. This is to help reduce the memory usage needed by the encryption process as it only needs to process and convert each chunk instead of the entire file.
  24. </p>
  25. <p>
  26. Once all the file's data has been processed, the final buffer is then passed back to the main encryption routine and is sent to the server as a ArrayBuffer, along with the content-type, generated iv, key size, and block size.
  27. </p>
  28. <p>
  29. Once the data has been recieved by the server, a unique URL name and unique local filename are generated and saved to the database along with the passed up cipher information. The File Data is then written to the server and the resulting URL is passed back to the client.
  30. </p>
  31. <p>
  32. When the client recieves the returned URL, it then appends the generated key to the URL as an anchor tag and updates the UI to display the final URL.
  33. </p>
  34. <br />
  35. <h3>Cipher Properties</h3>
  36. <p>
  37. The encryption library being used is <a href="">Crypto-JS</a> and the cipher being used is <b>AES-@Model.Config.UploadConfig.KeySize</b> using the mode <b>CTR</b>. The variant of AES is determined by the size of the key used (128, 192, or 256).
  38. </p>
  39. <h3>Upload Requirements</h3>
  40. <p>
  41. The maximum file size per upload is <b>@StringHelper.GetBytesReadable(Model.Config.UploadConfig.MaxUploadSize)</b>
  42. </p>
  43. <p>
  44. Each file is scanned for viruses at upload. If it fails, it will cancel the upload. Currently only files that are unencrypted when being sent to the server will be scanned successfully for viruses. If the file is encrypted client side, the encrypted data will be checked. This could create a false positive, but since the key is randomly generated, the next attempt should not be flagged.
  45. </p>
  46. </div>
  47. </div>
  48. </div>