0

I'm trying to encrypt files with the PointyCastle package for flutter. I don't see any information anywhere for throughput benchmarks but when testing a 100mb file, it is taking about 10 seconds which seems very high compared to another flutter aes package or just any other encryption software.

I have created an example that will encrypt a whole file here. Am I implementing this incorrectly? Are you also getting very slow throughput with this example?

https://gist.github.com/hootyjeremy/06909cc0e37305ce5a7e13e1ed7a0522

of course, you will have to substitute inputFileName and outputFileName.

mirkaim
  • 145
  • 1
  • 10
  • 1
    PC implements the AES round in software, where most other implementation use the AES round instructions available in modern processors, so of course its slower. Standard tradeoff of portability vs speed. – Richard Heap Sep 09 '22 at 01:30
  • Thanks for the answer. But are you saying that modern processors have AES instructions built into them? I didn't know about this. – mirkaim Sep 09 '22 at 02:23
  • https://en.wikipedia.org/wiki/AES_instruction_set – Richard Heap Sep 09 '22 at 15:57
  • Yeah, I googled it last night and found that. Thanks a lot. – mirkaim Sep 09 '22 at 21:59

0 Answers0