<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Locking Code</title>
		<link>http://forums.leaflabs.com/topic.php?id=9661</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:06:46 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=9661" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "Locking Code"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9661#post-21464</link>
			<pubDate>Tue, 04 Dec 2012 21:21:16 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">21464@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ala42 - A very interesting thread. &#60;/p&#62;
&#60;p&#62;I am with the user 'lanchon', there should be a clear explanation of how things work. I struggled to get a clear picture from PM0075. I thought it was me not thinking hard enough, so it's a bit of a relief it's not just me :-)&#60;/p&#62;
&#60;p&#62;PM0075 does state some things are prevented. My reading of that thread is it's inadequate. There are plenty of edge cases which are unclear (from PM0075) and no explanation of how protection is achieved to give the user confidence in the assertions.&#60;/p&#62;
&#60;p&#62;I struggle to imagine how anything can be protected if JTAG/SWD is available. To protect a device those pins need to be disabled. For a physical attack that'll be hard.&#60;/p&#62;
&#60;p&#62;Also, USART1 and with appropriate settings of BOOT pins will load and boot from RAM. So USART1 and the boot pins need disabling too.&#60;/p&#62;
&#60;p&#62;@tmbomber - could you encapsulate the board, e.g. in a block of epoxy, to make physical attack difficult and detectable? Or is that inadequate?&#60;/p&#62;
&#60;p&#62;I struggle to believe that a program in RAM is blocked from copying Flash to RAM under all circumstances.&#60;br /&#62;
The ARM doesn't have &#34;load in-line literal value&#34; instructions, it uses 'constant pools' which are read using an addressing mode (offset from a memory address in a register). So for code executing in Flash, those addressing modes must still work. &#60;/p&#62;
&#60;p&#62;It'd take several days work to determine that simple attacks don't work, and that wouldn't prove the device is secure, just you couldn't find a successful attack.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "Locking Code"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9661#post-21461</link>
			<pubDate>Tue, 04 Dec 2012 19:27:54 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">21461@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;According to this thread &#60;a href=&#34;https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FProtection%2C%20Is%20my%20code%20in%20Flash%20really%20secure&#38;amp;FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&#38;amp;currentviews=8182&#34; rel=&#34;nofollow&#34;&#62;https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FProtection%2C%20Is%20my%20code%20in%20Flash%20really%20secure&#38;amp;FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&#38;amp;currentviews=8182&#60;/a&#62;&#60;br /&#62;
you can load code into the internal RAM and start it. RAM code can read the protected flash rom. I have not tried that myself.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Locking Code"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9661#post-21456</link>
			<pubDate>Tue, 04 Dec 2012 14:39:36 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">21456@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Yea, finding stuff is becoming dreadful. We're drowned in noise. The only way to make a living in search is advertising, and advertising and detailed, factual accuracy are not strongly aligned :-(&#60;/p&#62;
&#60;p&#62;I've sometimes tried duckduckgo too. It seems very 'hit and miss' - sometimes it is better, sometimes much worse.&#60;/p&#62;
&#60;p&#62;Even with &#34;site:www.st.com f:pdf&#34; neither google nor duckduckgo could find an appropriate document with &#34;stm32f103 flash protection&#34;, or even &#34;stm32f103 protection&#34;.&#60;/p&#62;
&#60;p&#62;I imagine it might be because ST have broken their web site.&#60;/p&#62;
&#60;p&#62;When I searched on ST.com, I couldn't find anything better than the &#34;AN3429&#34; Application note, which isn't really what is needed.&#60;/p&#62;
&#60;p&#62;It is almost easier to download all of the application notes, user manuals, data sheets, technical notes, programming manuals, reference manuals, and errata then let Mac's Spotlight have a search.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>feurig on "Locking Code"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9661#post-21454</link>
			<pubDate>Tue, 04 Dec 2012 14:13:29 +0000</pubDate>
			<dc:creator>feurig</dc:creator>
			<guid isPermaLink="false">21454@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;My web developer friends highly recommend duck duck go as a potential workaround to googles increasing commercial noise to usable data ratio. Its getting harder and harder to just find what you need these days.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Locking Code"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9661#post-21440</link>
			<pubDate>Mon, 03 Dec 2012 21:31:43 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">21440@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;tmbomber - I found something a little more helpful. Section &#34;2.4 Protections&#34; and &#34;2.5 Option byte description&#34;&#60;br /&#62;
&#60;a href=&#34;http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/PROGRAMMING_MANUAL/CD00283419.pdf&#34; rel=&#34;nofollow&#34;&#62;http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/PROGRAMMING_MANUAL/CD00283419.pdf&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;IIRC, you also need to disable JTAG/SWD, or option bytes can be changed through that route.&#60;/p&#62;
&#60;p&#62;[Irritatingly, I had more luck with Spotlight on my Mac than (the increasingly pathetic) google, so it took longer to find the on-line originals that it might if google had just found stuff.]
&#60;/p&#62;</description>
		</item>
		<item>
			<title>feurig on "Locking Code"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9661#post-21439</link>
			<pubDate>Mon, 03 Dec 2012 20:44:39 +0000</pubDate>
			<dc:creator>feurig</dc:creator>
			<guid isPermaLink="false">21439@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks gbulmer! I knew it was out there but I really didn't have time to rtftn's and field this one.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Locking Code"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9661#post-21436</link>
			<pubDate>Mon, 03 Dec 2012 18:20:33 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">21436@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I have dug around and only found:&#60;br /&#62;
&#60;a href=&#34;http://www.hitex.com/fileadmin/pdf/insiders-guides/stm32/isg-stm32-v18d-scr.pdf&#34; rel=&#34;nofollow&#34;&#62;http://www.hitex.com/fileadmin/pdf/insiders-guides/stm32/isg-stm32-v18d-scr.pdf&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/DM00033344.pdf&#34; rel=&#34;nofollow&#34;&#62;http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/DM00033344.pdf&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;IIRC this data has been available, but the second (ST) document recommends &#34;For more details about the complete solution, please contact your local ST sales representative. &#34; !
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tmbomber on "Locking Code"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9661#post-21370</link>
			<pubDate>Fri, 30 Nov 2012 18:45:41 +0000</pubDate>
			<dc:creator>tmbomber</dc:creator>
			<guid isPermaLink="false">21370@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Folks, I said it might be a silly question, but it was a serious one.&#60;/p&#62;
&#60;p&#62;Any thoughts on this out there???
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tmbomber on "Locking Code"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9661#post-21202</link>
			<pubDate>Tue, 20 Nov 2012 16:47:23 +0000</pubDate>
			<dc:creator>tmbomber</dc:creator>
			<guid isPermaLink="false">21202@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi Everybody,&#60;/p&#62;
&#60;p&#62;This may be a silly question, but it's something that I'd like to know...&#60;/p&#62;
&#60;p&#62;Is there a way to hand out a programmed Maple without having to worry about someone sucking the code out of it, disassembling it, and reverse engineering my source code?&#60;/p&#62;
&#60;p&#62;Say I have a bit of code loaded onto a Maple, and for the time being I wanna keep that code private. I'd like to pass the board around to a couple people for them to play with, but I'm not ready to let them have the code.&#60;/p&#62;
&#60;p&#62;In days gone by I've done just that on other processors. But I'm unsure if it's possible with the Maple's processor. (lets assume that the people I'm giving the board to are resourceful enough that if your answer is &#34;difficult, but possible&#34; you'd actually be say &#34;yes, they can&#34;)&#60;/p&#62;
&#60;p&#62;I know there's lock bits in the fuses of the ATMEGA processors, but I'm unsure what those actually do. For the Maple board I've never played around with anything other than the standard IDE so I'm unsure what options are available.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
