Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:22 26 Oct 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : [Picomite] AES128 crypto programs

Author Message
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1645
Posted: 12:50pm 25 Dec 2024
Copy link to clipboard 
Print this post

2nd attempt

For V6.00.01RC10

Here is a simple (working, but not finished!) demo program for the AES128 function for PicoMites. The program can encrypt and decrypt files of seemingly any length (e.g. text, images, music, etc.).
Picomite_AES_File08.zip
( v0.08 RandomKey$() corrected)

For strings:
AES_String001.zip

Comments, criticism, own suggestions, changes and discussion are welcome.
With big thanks to Peter! !
Regards
Michael
Edited 2024-12-26 06:43 by twofingers
causality ≠ correlation ≠ coincidence
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 710
Posted: 11:24am 11 Oct 2025
Copy link to clipboard 
Print this post

Hi Michael,

I wanted to try out your AES FILE encryption but only get an Error:


[97] In $=Input$(CH_SIZE,#2)
ERROR: Missing Program Statement


Have you any suggestions?

Greetings
Daniel
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1645
Posted: 11:58am 11 Oct 2025
Copy link to clipboard 
Print this post

Hi Daniel,
There seems to have been a transmission error.
For me, it shows the following:
in$=Input$(CH_SIZE,#2)




Or is "in" a reserved word now?
Kind regards
Michael
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10511
Posted: 12:04pm 11 Oct 2025
Copy link to clipboard 
Print this post

in is a reserved word as it is a PIO instruction
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1038
Posted: 12:08pm 11 Oct 2025
Copy link to clipboard 
Print this post

None of the PIO Instructions can be used as variable names.
Internally MMBasic treats them as commands as part of PIO Assemble. e.g.
PIO assemble 1,"IN null,32 side 2" 'set ISR to 0, GP1 high (load), ‘GP0 l

All these variables will be save internally as Commands.

in$="123"
out$="123"
jmp$="123"
wait$="123"
push$="123"
pull$="123"
mov$="123"
irq$="123"
set$="123"


Paste the above in via AUTOSAVE , and then open in the editor and you will see them stored as commands.
In and Out are the ones you will most likely stumble accross.



In $="123"
Out $="123"
Jmp $="123"
Wait $="123"
Push $="123"
Pull $="123"
Mov $="123"
IRQ $="123"
Set $="123"


F4 H7FotSF4xGT
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1645
Posted: 12:37pm 11 Oct 2025
Copy link to clipboard 
Print this post

@Peter & Gerry
Thanks both of you for the confirmation! The strange thing is that the program worked for me (I'm pretty sure it was with V6.00.01RC10). I've just tested again. "In$" is converted to "In $" with V6.01.00b5.
Nobody seems to be interested in this topic except Daniel, otherwise I would upload a corrected version.
Regards
MIchael
causality ≠ correlation ≠ coincidence
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 710
Posted: 05:03pm 11 Oct 2025
Copy link to clipboard 
Print this post

Ah, ok I understand!

So I just have to change the variable name.

EDIT: I changed the variable name and now the program works just perfect, thank you! I think this could be a great thing to convert it into a GUI application. I have plenty of use for this, for example in my diary / journal program. But first things first...  

Greetings
Daniel
Edited 2025-10-12 03:53 by Amnesie
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1645
Posted: 08:56am 12 Oct 2025
Copy link to clipboard 
Print this post

  Amnesie said  ... I think this could be a great thing to convert it into a GUI application. ...

Hi Daniel,
I would be happy if the code could be of any use to others. I had long since forgotten about this little demo. When I made it, I didn't have HDMI picomites yet. In general, it's not necessary to mention my name if parts of my code are reused. Have fun!
Kind regards
Michael
causality ≠ correlation ≠ coincidence
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 710
Posted: 03:10pm 12 Oct 2025
Copy link to clipboard 
Print this post

  twofingers said  
  Amnesie said  ... I think this could be a great thing to convert it into a GUI application. ...

Hi Daniel,
I would be happy if the code could be of any use to others. I had long since forgotten about this little demo. When I made it, I didn't have HDMI picomites yet. In general, it's not necessary to mention my name if parts of my code are reused. Have fun!
Kind regards
Michael


Hi Michael,

your code is a huge help for me and fits perfectly into my diary application. For now, I implemented it in a way one can select different files or diary entrys to encrypt and decrypt (all in my GUI approach). It works great! And of course I do always mention the work of others, even though this is not a commercial application. This is just for fun, of course.

I hope to show some progress at some point    

I always do save those cool little test and demonstration programs from the forum on my HDD for later reincarnation  

Greetings
Daniel
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025