Is there a way with standard parts to give a device "unbreakable" encryption? - Page 1
Forum section: electronics / general

author: JoeN
author_rank: Frequent Contributor
timestamp: February 23, 2016, 07:04:08 am
content: So it seems Apple's device isn't unbreakable because the unbreakable key and cypher is protected by a rather short password and the routine that only allows 10 guesses before erasing the encrypted key is just a firmware routine than Apple can change at any point if they want to or someone makes them.I pointed out in my other thread on this subject that if there was a crypto IC that held that key information and was not reprogrammable then this security flaw would be fixed or mooted. I was told that these ICs do exist as "trusted platforms" etc. It seems to me such an IC could be reasonably simple. Platform, my ass, all it should be is an 8-pin IC. All it needs to be able to do is 1) create a random and long key that can be used by a mathematically strong crypto algorithm, 2) hash this with some human-friendly shorter password on creation, 3) store it local to that IC in a highly physically protected manner, 4) only divulge the key when the password is correct, 5) never divulge the hashed key, 6) erase the hashed key if the API to retrieve it is called N times with an incorrect password. Hopefully it can do all of this over SPI and/or I2C with a good datasheet.I see there are "security" ICs from Atmel, Microchip, etc., out there. Do they do this or they more just random number generators? Is anyone making what I am asking for here? It seems that if this IC exists, then local storage of unbreakably strongly encrypted data is actually possible, even if Apple doesn't implement it quite yet. It might be breakable by someone who can probe really small features on a really protected IC, but nobody else.

author: ataradov
author_rank: Super Contributor
timestamp: February 23, 2016, 07:21:36 am
content: Any micro with corresponding firmware will do the trick.TPMs are already 6 and 8 pin devices. There is not a whole lot of information out there due to sensitive nature of the subject, but they do almost exactly what is described in your requirements.

author: BradC
author_rank: Super Contributor
timestamp: February 23, 2016, 07:25:11 am
content: Quote from: JoeN on February 23, 2016, 07:04:08 amCorrect for the device in question (a 5 series iPhone). They've rectified that on later models.

author: marshallh
author_rank: Unknown
timestamp: February 23, 2016, 07:33:10 am
content: No.

author: JoeN
author_rank: Frequent Contributor
timestamp: February 23, 2016, 07:38:00 am
content: Quote from: ataradov on February 23, 2016, 07:21:36 amThat is ridiculous. That is the manufacturer saying it's only secure because it is obfuscated. "Trust me, this platform is secure as long as the attacker is kept in the dark by them not getting this secret datasheet." Color me highly unimpressed.

author: Rerouter
author_rank: Super Contributor
timestamp: February 23, 2016, 07:38:18 am
content: There are planety of platforms out there that do similar things (partial or full erase on X condition), the simplest being a ram chip with battery backup, dont like your input, then reset the power,but yeah they go far off into the crazy hard to beat path, only hard thing about encryption is to make sure how your device talks to the device doesn't give away the method of encryption, there has been a few times where i have come across security methods that where meant to randomised or unique, but where the same, a 1 wire ID, or didnt actually care what the input was, but that it was in the right format.E.g. like in your example, you dont want your own device to be able to know the key until the password is entered and passed through the device for confirmation, meaning without that password it is very very difficult to break, however if they looked at say 10 devices and found out they all used the same private key for input vs output, it would be much faster to break,And to clarify, all current encryption is breakable in the sense that they would be defeated before the heat death of the universe following computing power increases per year,If you can dream up something that doesn't just add more digits and cannot be beaten by brute forcing, then i would imagine you could be a very rich mathematician,

author: ataradov
author_rank: Super Contributor
timestamp: February 23, 2016, 07:41:19 am
content: Quote from: JoeN on February 23, 2016, 07:38:00 amNo it is not. They are trying to comply with US ITAR and other export regulations. They have good security, but they can't sell those chips left and right.

author: JoeN
author_rank: Frequent Contributor
timestamp: February 23, 2016, 07:45:51 am
content: Quote from: ataradov on February 23, 2016, 07:41:19 amI thought that law meant they couldn't sell those ICs outside of the U.S. without an export license, not that they couldn't sell them within the U.S. or provide complete datasheets everywhere in the world for download.

author: JoeN
author_rank: Frequent Contributor
timestamp: February 23, 2016, 07:49:22 am
content: Quote from: Rerouter on February 23, 2016, 07:38:18 amJust to be a jerk, I am going to point out that one time pad cannot be broken by brute force. Of course, that cypher is not relevant to encrypting large portions of storage on a device.

author: marshallh
author_rank: Unknown
timestamp: February 23, 2016, 07:54:15 am
content: The closest thing I know of (thats practical) is the ATSHA204. By the way I asked a friend to take a look at it under the SEM. Trust me, to crack that one you're going to have a tough time, though it can be done it will be quite time consuming and impractical to do so. You can read Atmel's appnotes about it. It is very flexible (almost to the point of annoyance) to handle a large number of use cases.The trick is making sure you implement the security correctly. Even if some method is mathematically solid (cryptographically secure) there will ALWAYS be an implementation weakness. If you do something stupid you can easily shoot yourself in the foot, so it helps to have a basic working knowledge of crypto theory like public key encryption, asymmetric vs. symmetric, hash, etc.

author: JoeN
author_rank: Frequent Contributor
timestamp: February 23, 2016, 07:57:54 am
content: Quote from: marshallh on February 23, 2016, 07:54:15 amI am actually aware of that chip because Sparkfun did a breakout for it. I just gave the datasheet a real quick search over. Can be used to store a hashed up randomly generated key and only divulge it back to the host uC with the correct password and delete it on a Nth failed attempt? I couldn't seem to find that in the datasheet. Keep in mind I really blasted through it fast with some searches I thought would find it for me. If it can, that is an attractively cheap IC.

author: ataradov
author_rank: Super Contributor
timestamp: February 23, 2016, 07:58:25 am
content: Quote from: JoeN on February 23, 2016, 07:45:51 amThey could, but they prefer not to. They will happily provide you a DS after you sign an NDA. Part of ITAR requirements is due diligence. They can't just sell those part to some Joe Bloggs, who will turn around and resell them to Iran. This is not a theory, distributors have got in trouble for doing things like that.

author: marshallh
author_rank: Unknown
timestamp: February 23, 2016, 08:00:26 am
content: Quote from: JoeN on February 23, 2016, 07:57:54 amYou would do that by combining an encoded data read with the consumable slot mode. I think there is some stuff in there where you can make it run like an ink cartridge meter, etc.

author: JoeN
author_rank: Frequent Contributor
timestamp: February 23, 2016, 08:04:57 am
content: Quote from: marshallh on February 23, 2016, 08:00:26 amI will read this and try to wrap my head around it. But I have to ask, does doing it this way meet the requirement that the uC cannot possibly attempt to retrieve that key N failed times without it self destructing? If the uC is simply writing it back and failing to write it back on the Nth failed time because of uC firmware, then all that needs to happen is for the firmware to be updated in order to preserve that key for unlimited readbacks and therefore eventual decoding by a brute force attack.

author: marshallh
author_rank: Unknown
timestamp: February 23, 2016, 08:35:54 am
content: Quote from: JoeN on February 23, 2016, 08:04:57 amIf you can crack a 256bit key, over an intentionally slow 300 baud serial bus or i2c... then you have lots of job opportunities

author: dannyf
author_rank: Super Contributor
timestamp: February 23, 2016, 11:56:29 am
content: No. As long as it is made by man, man can break into it.End of the day, the encryption information, the algorithm, the key, the passcode, ..., has to be stored on the chip. So it can be hacked.

author: retrolefty
author_rank: Super Contributor
timestamp: February 23, 2016, 01:15:39 pm
content: I have a question about the method used by apple to allow user encryption of their data. As I understand the method, Apple uses a long key + user pass word to encrypt and decrypt data. If a user changes their pass word does this create a new hashed long key or just allows access to the existing (unchanged) long key? If so it would seem to me that the user would not be able to decrypt their data that was encoded with the older hashed key+pass word?In the crypto systems I worked with in the military in the 60s required a whole new (long) key be changed every 24 hours by inserting a new key card (keypunch type card that was destroyed after it's 24 hour use). Key management was an important, expensive, and time consuming part of the whole system. The thought at the time is that a whole physical crypto device could be given to an 'adversary' but without the next or past keys it would not compromise the system as long as new keys continued to be used.So if the full key + password never changes the 'final' key then the 'flaw' to me is in Apples's key management and will always be vulnerable to pass word hacking? It will always be easier to break a short password then the full key if the full key never changes.

author: HAL-42b
author_rank: Frequent Contributor
timestamp: February 23, 2016, 02:41:00 pm
content: I wonder how they do thisTempered glass and high tCO resistor I presume. Heating the resistor causes it to expand and it breaks the glass.I suppose it is possible to use in reverse like a dead man's switch. You cut the power, the resistor cools and cracks the glass. Good for making chips tamper resistant.Combine this with something that requires you to enter a keep alive password every 12 hours and you have something reasonably secure against hardware attacks.

author: TerraHertz
author_rank: Super Contributor
timestamp: February 25, 2016, 06:28:36 am
content: There's no need to resort to complicated technology, Just use one-time pads. Which simply require you to keep the pads (or a USB stick holding them) physically separate from the device storing the encrypted data you want to stay private. And well hidden, of course.If your one-time pads are truly random (ie generated by a true random physical process, like nuclear decay, not some algorithm) and you only use each one once, there is no way at all to decipher an encrypted message without that pad. Not ever, no matter how much processor power you have available.Yes, I know there are logistics problems with one time pads. But the question was 'any way', not 'any convenient way'.

author: Jeroen3
author_rank: Super Contributor
timestamp: February 25, 2016, 06:38:48 am
content: The safety of encryption is defined in the time it will take the fastest computer to crack it.When the quantum computers come to market, expect a revolutionary rise in the cipher length.Meanwhile, it can't be "just an 8 pin chip", it also contains several decoy layers and other obfuscating hardware to delay anyone who tries to read it with their microscope.

author: JoeN
author_rank: Frequent Contributor
timestamp: February 25, 2016, 06:39:55 am
content: Quote from: Jeroen3 on February 25, 2016, 06:38:48 amHelp me out, I am having a failure of imagination here. How do these physical protections affect the number of pins?

author: JoeN
author_rank: Frequent Contributor
timestamp: February 25, 2016, 06:43:20 am
content: Quote from: TerraHertz on February 25, 2016, 06:28:36 amBy "unbreakable" I meant using ordinary means available at reasonable costs. I specifically said "It might be breakable by someone who can probe really small features on a really protected IC, but nobody else." That's the level of unbreakability I meant. And it seems to me that ciphers are unbreakable right now as long as either 1) the key is a 256 bit key using a known strong cipher like AES and also 2a) only a small number of attempts is allowed to guess the password to protect that key and it is enforced in hardware or 2b) the key to protect the password is itself strong, like a nine word diceware password.I can't take the OTP suggestion seriously. Your password is in the clear rather than just being in your mind. Also, you now think that someone who confiscated the encrypted device somehow can't confiscate the key which is just another device in near proximity to the first device. What are you smoking? They are going to find it, guaranteed. OTP is a good scheme for encrypting messages that are decoded and then usually discarded, not a bulk amount of data that has to be decrypted continuously and updated.

author: HAL-42b
author_rank: Frequent Contributor
timestamp: February 25, 2016, 11:50:34 am
content: OTP is theonlyencryption that is known to work.In other words the problem of brute forcing an OTP cypher there is equal possibility the message would resolve to one of Shakespeare's sonnets. The problem is untractable.It is the only known encryption that guarantees this property. I think comments like "OTP works but...." are asinine and counterproductive. They delay adoption and encourage people to use backdoored ciphers.Storing OTP keys on digital media on the other hand is a no-no. You must ensure that two and only two copies of the key exist. On digital media this is not possible because the cost of copying bits is zero.You must also make sure the key is destroyed as soon as it is used. Again, not possible with USB sticks because they have certain data remanence.Paper tape was a good storage medium for OTP and was used for long time by the CIA and by embassies. It is difficult to replicate without special machinery. It is easy to make sure it is destroyed once it has been used. There are ways to make sure a piece of tape was used once and only once.For example CIA stored key material in cartridge that can feed paper tape out but can't feed it back in. They were also produced in two colors of plastic that flowed randomly in the mold. This way each cartridge was unique and substitution was difficult.

author: ve7xen
author_rank: Super Contributor
timestamp: February 25, 2016, 08:07:51 pm
content: Quote from: retrolefty on February 23, 2016, 01:15:39 pmThe typical way is to generate a random storage encryption key when the volume is first encrypted. This key is encrypted by the composite key the user has (which is typically based on an intentionally slow hash function, or many rounds of a hash function, plus a large random seed, to stymie local attacks). When the user enters their key, it's used to decrypt the storage key, which can decrypt the volume. When the user changes their password, the storage key is encrypted with the new composite key, and the old copy destroyed. I'm not sure if this is exactly how Apple does it, but I would assume some variant on this scheme as it's how most full-disk encryption do it to avoid re-encrypting the entire data.It's somewhat analogous to practical public key crypto, where the slow asymmetric cipher is used to transfer a key used to symmetrically encrypt the data.

author: retrolefty
author_rank: Super Contributor
timestamp: February 25, 2016, 09:42:55 pm
content: QuoteThat has to be an overstatement.OTP is provably 'unbreakable' assuming proper key management. Other forms of encryption are also 'unbreakable', but not provable, in many practical applications. unbreakable encryption for smart phones that the user has no responsibilities or tasks for, I'm not so sure. In this case Apple would have no trouble circumventing security, they just don't want to have to at Government(s) demands.

author: HAL-42b
author_rank: Frequent Contributor
timestamp: February 25, 2016, 11:30:21 pm
content: Let's say the only crypto that satisfies Shannon's 'perfect forward secrecy' criteria.