02 January 2023, 23:57 | #1 |
Registered User
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
|
How to do file encryption using poke and peek?
Hey guys,
I want to encrypt my files where it cannot be viewed or modified outside the program. I want the program to be able to decrypt the file, get's values, display them on the screen. When the person modifies the values it saves them back into the file and do encryption again. I want to do a 16 bit encryption. I am coding in AmiBlitz of course. Any advise how to do that would be greatly appreciate it. I prefer using Poke and Peek to do this if possible. |
03 January 2023, 12:48 | #2 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,213
|
This is not a trivial topic; Amiga is a shared-memory architecture so if you decrypt the file in-memory then any other program running would also be able to view the contents. How secure do you want it to be? A simple way would be to XOR the 16-bit values with some secret key. A complex way would be to implement RSA public-private key security or something similar.
|
03 January 2023, 22:13 | #3 | |
Registered User
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
|
Quote:
|
|
04 January 2023, 15:35 | #5 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,213
|
Once you have got XOR'ing working, you can add a stream cypher to generate a more pseudo-random output. RC4 is "broken" in that it's no longer considered secure enough for real use, but it is simple and could be implemented on the Amiga without much effort. It's certainly more secure than XOR with a static key alone.
https://en.wikipedia.org/wiki/RC4 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Poke BPLxMOD after WAIT in Copperlist | KONEY | Coders. Asm / Hardware | 2 | 18 November 2020 14:00 |
Blitz Basic 2 & Peek | Retro1234 | Coders. Language | 11 | 28 February 2016 19:34 |
anyone got an Atari ST they can peek inside? | Interceptor | support.Hardware | 29 | 17 April 2015 15:29 |
AES-256 ECB file encryption tool for classic Amiga | modrobert | Coders. Releases | 44 | 24 March 2015 14:23 |
Winuae Poke commands | macca72 | support.WinUAE | 6 | 04 July 2010 19:31 |
|
|