Search found 53 matches

by v923z
Mon Feb 06, 2017 7:22 am
Forum: Development of MicroPython
Topic: hiding python code on the board
Replies: 21
Views: 5761

Re: hiding python code on the board

To make things a bit harder why not: 1) disable REPL (do not compile it into your FW) But that is the whole point. I would like to retain the REPL. Otherwise, I could just write the whole stuff in C on a microcontroller that is tamper-proof. PS: Why not make the *key* hidden and use a encryption al...
by v923z
Mon Feb 06, 2017 7:16 am
Forum: Development of MicroPython
Topic: hiding python code on the board
Replies: 21
Views: 5761

Re: hiding python code on the board

dhylands wrote:You can read out the code through the REPL.
Interesting. So, how would I do that? I mean, given the compiled C code for unscramble, what would I have to do on the python prompt to get the unscrambled code?
by v923z
Sun Feb 05, 2017 7:45 am
Forum: Development of MicroPython
Topic: hiding python code on the board
Replies: 21
Views: 5761

Re: hiding python code on the board

flash contains a bunch of stuff: 1 - The Micropython firmware - i.e. the compiled C 2 - The internal filesystem 3 - Any frozen bytecode that you've compiled into the firmware. Extracting the frozen bytecodes and internal filesystem is straight forward given a memory dump or debugger access, just us...
by v923z
Sat Feb 04, 2017 8:52 pm
Forum: Development of MicroPython
Topic: hiding python code on the board
Replies: 21
Views: 5761

Re: hiding python code on the board

You'd also want to modify the firmware to not execute any code from an external source, like an SD card. It's trivial to write a small python script which dumps the entire contents of flash and RAM to a file on the sdcard. Does it matter, where the code is executed from? Once you have the REPL, any...
by v923z
Sat Feb 04, 2017 12:19 pm
Forum: Development of MicroPython
Topic: hiding python code on the board
Replies: 21
Views: 5761

Re: hiding python code on the board

To be constructive... The intent you forshadow might be implemented on a kind of dedicated controller for your to be protected hardware/circuitry. That one could implement the secret stuff and be implemented on aore closed MCU with secured flash or the like. While your overall logic is in a micropy...
by v923z
Sat Feb 04, 2017 8:23 am
Forum: Development of MicroPython
Topic: hiding python code on the board
Replies: 21
Views: 5761

Re: hiding python code on the board

I thought that only unscramble() was written in C :oops: No, I didn't make that clear, sorry. In most cases I'm doubtful of the merits of going to lengths to decipher someone else's code if it has to be done at disassembly level. Provide a decent programmer with a definition of the problem to be so...
by v923z
Sat Feb 04, 2017 7:53 am
Forum: Development of MicroPython
Topic: hiding python code on the board
Replies: 21
Views: 5761

Re: hiding python code on the board

If an attacker can access your hardware he has access to the scrambled code and the key, and has hardware with firmware containing an unscramble() function. So I'm struggling to understand how it is secure. Peter, The scrambled code, or the key would not have to be hidden. I could give both to you ...
by v923z
Sat Feb 04, 2017 7:35 am
Forum: Development of MicroPython
Topic: hiding python code on the board
Replies: 21
Views: 5761

hiding python code on the board

Hi all, This question has been raised in various forms, the last occurrence might probably be this: http://forum.micropython.org/viewtopic.php?f=3&t=2842 In short, I would like to hide certain critical portions of my code. It seems to me that there are 3 options. 1. With the cross-compiler, one can ...
by v923z
Tue Jan 10, 2017 12:49 pm
Forum: General Discussion and Questions
Topic: rotating framebuf
Replies: 8
Views: 2344

Re: rotating framebuf

I think it's much better to rotate the display in hardware -- most LCD driver chips have a number of register for controlling the orientation and scrolling of the image. Check the datasheet for your display. This has the advantage of being practically free in terms of CPU cycles. Good point, thanks...
by v923z
Tue Jan 10, 2017 12:47 pm
Forum: General Discussion and Questions
Topic: rotating framebuf
Replies: 8
Views: 2344

Re: rotating framebuf

Code like my writer module https://github.com/peterhinch/micropython-samples/commit/c56753fde0477863cc01352574a8b31edd68534b could easily be adapted for upside down and 90 degree text, This is exactly what I am doing now, but this implies that one has to have 4 sets for each font, or the font has t...