Advertisement
Guest User

LEAKED: Full Emails of Ethan Heilman, DCI and IOTA

a guest
Feb 24th, 2018
1,000
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 171.23 KB | None | 0 0
  1. Letter #1
  2. Author: Ethan Heilman
  3. Date: 15th of July
  4. Dom, David and the rest of the IOTA team,
  5. We have found serious cryptographic weaknesses in the cryptographic hash function
  6. curl used by IOTA, curl. These weaknesses threaten the security of signatures and
  7. PoW in IOTA as PoW and Signatures rely on curl to be pseudo-random and collision
  8. resistant.
  9. We provide a report on these attacks at the end of this email. In this report we describe
  10. two attacks on the collision and second-preimage security of curl, (attack 1 and attack
  11. 2) and an attack on the pseudo-randomness of curl (attack 3). Finally we provide
  12. recommendations to mitigate these weaknesses in IOTA and suggestions on how to
  13. maintain the desired properties of IOTA.
  14. We omit a description of our differential cryptanalysis of the transformation used in curl
  15. as these efforts are ongoing and have yet to result in full collisions. We are making
  16. steady progress (we can break 24 of 27 rounds of curl) and expect to have far more
  17. powerful collisions and preimage attack in a few weeks. However attacks 1 and 2
  18. already generate collisions for the full 27 rounds of curl.
  19. For replication purposes we wrote a short python script using pyota which is attached.
  20. The examples of each attack use this python script and are also replicated in the python
  21. script (curlexamples.py).
  22. We are planning on publishing these results within the next two weeks. Let us know
  23. what actions you plan to take so that we can coordinate.
  24. Thanks,
  25. Ethan, Tadge
  26. Attack 1 (Prefix-zero based collisions and second-preimages):
  27. Curl has the following properties:
  28. 1. The sponge state is initialized to all zero.
  29. 2. The curl transformation when applied to an all zero state results in an all zero state,
  30. i.e. zero is a fixed point of the transformation.
  31. Transform([0]*729]) = [0]*729
  32. Thus if the first N message blocks are all zeros, then the hash output and the state will
  33. be all zeros. This allows the creation of an unlimited number of collisions and secondpreimages.
  34. H([0]*243) = [0]*243 = H([0]*486) = H([0]*243*X)
  35. [0]*243 denotes a string of zeros of length 243. H denotes a call to the curl hash
  36. function.
  37. Since the state is the same regardless of the number of prefixed zero input blocks we
  38. can create more complex collisions and second-preimages:
  39. H(arbitrary string) = H([0]*243||arbitrary string) = H([0]*243*X||arbitrary string)
  40. where || denotes concatenation. Thus, given any message we can find a collision by
  41. prepending 243 zeros.
  42. Simple all zero collisions:
  43. msg1 =
  44. b'99999999999999999999999999999999999999999999999999999999999999999999
  45. 9999999999999'
  46. msg2 =
  47. b'99999999999999999999999999999999999999999999999999999999999999999999
  48. 9999999999999999999999999999999999999999999999999999999999999999999999
  49. 999999999999999999999999'
  50. hash1 = H(msg1)
  51. hash2 = H(msg2)
  52. print hash1
  53. 9999999999999999999999999999999999999999999999999999999999999999999999
  54. 99999999999
  55. print hash2
  56. 9999999999999999999999999999999999999999999999999999999999999999999999
  57. 99999999999
  58. print hash1 == hash2, msg1 == msg2
  59. True False
  60. Zero prefix collisions/second-preimages:
  61. msg1 =
  62. b'KXRVLFETGUTUWBCNCC9DWO99JQTEI9YXVOZHWELSYP9SG9KN9WCKXOVT
  63. EFHFH9EFZJKFYCZKQPPBXYSGJ'
  64. msg2 =
  65. b'99999999999999999999999999999999999999999999999999999999999999999999
  66. 9999999999999KXRVLFETGUTUWBCNCC9DWO99JQTEI9YXVOZHWELSYP9SG9K
  67. N9WCKXOVTEFHFH9EFZJKFYCZKQPPBXYSGJ'
  68. hash1 = H(msg1)
  69. hash2 = H(msg2)
  70. print hash1
  71. NGAZRRBUKTEJLNOQEZJZIRMY9DAVNZBOHCMELEOEFCGSJEIKDWETOMDOO
  72. QDBQILEJLD9MVXZZXZQGNHRK
  73. print hash2
  74. NGAZRRBUKTEJLNOQEZJZIRMY9DAVNZBOHCMELEOEFCGSJEIKDWETOMDOO
  75. QDBQILEJLD9MVXZZXZQGNHRK
  76. print hash1 == hash2, msg1 == msg2
  77. True False
  78. Attack 2: Collisions resulting from failure to use message padding:
  79. As message padding is not used in curl, we can construct messages of different lengths
  80. that result in the same sponge state. Because the sponge state is identical both
  81. messages result in the same hash output. This results in collisions/second-preimages
  82. for all messages whose trit length is not a multiple of 243.
  83. For instance H(1) = H(10) = H(100).
  84. This also works for messages which are longer than 243 trits. In such instances the
  85. sponge state is prepended to the second-preimage.
  86. Short message padding collisions:
  87. msg1 =
  88. b'RSWWSFXPQJUBJROQBRQZWZXZJWMUBVIVMHPPTYSNW9YQIQQF9RCSJJCV
  89. ZG9ZWITXNCSBBDHEEKDRBHV'
  90. msg2 =
  91. b'RSWWSFXPQJUBJROQBRQZWZXZJWMUBVIVMHPPTYSNW9YQIQQF9RCSJJCV
  92. ZG9ZWITXNCSBBDHEEKDRBHV9'
  93. msg3 =
  94. b'RSWWSFXPQJUBJROQBRQZWZXZJWMUBVIVMHPPTYSNW9YQIQQF9RCSJJCV
  95. ZG9ZWITXNCSBBDHEEKDRBHV99'
  96. hash1 = H(msg1)
  97. hash2 = H(msg2)
  98. hash3 = H(msg2)
  99. print hash1
  100. QRXLIX9IFYTYEFVDUDLGHRJSKMXLIXMMMJAGOBABU9UAZVKMPBYOQBERC9L
  101. TDVQGBVIMKGQVMQHJVKKQX
  102. print hash2
  103. QRXLIX9IFYTYEFVDUDLGHRJSKMXLIXMMMJAGOBABU9UAZVKMPBYOQBERC9L
  104. TDVQGBVIMKGQVMQHJVKKQX
  105. print hash3
  106. QRXLIX9IFYTYEFVDUDLGHRJSKMXLIXMMMJAGOBABU9UAZVKMPBYOQBERC9L
  107. TDVQGBVIMKGQVMQHJVKKQX
  108. print hash1 == hash2 == hash3, msg1 == msg2, msg2 == msg3
  109. True False False
  110. Long message collisions:
  111. In this example we choose to include IWASFLYINGINVERTED and KENNYLOGGINS
  112. in the messages to show the level of control this attack has over the colliding messages.
  113. In fact the only parts of the message not under the control of the attack is the pretended
  114. trytes, in this case “SMJFFCW'
  115. msg1 =
  116. b'IWASFLYINGINVERTEDNAARIPONBWXUOQUFGNOCUSSLYWKOZMZUKLNITZIF
  117. XFWQAYVJCVMDTRSHORGNSTKX9Z9DLWNHZSMNOYTU9AUCGYBVIITEPEKIXB
  118. COFCMQPBGXYJKSHPXNUKFTXIJVYRFILAVXEWTUICZCYYPCKENNYLOGGINS'
  119. msg2 =
  120. b'IWASFLYINGINVERTEDNAARIPONBWXUOQUFGNOCUSSLYWKOZMZUKLNITZIF
  121. XFWQAYVJCVMDTRSHORGNSTKX9Z9DLWNHZSMNOYTU9AUCGYBVIITEPEKIXB
  122. COFCMQPBGXYJKSHPXNUKFTXIJVYRFILAVXEWTUICZCYYPCKENNYLOGGINSS
  123. MJFFCW'
  124. hash1 = H(msg1)
  125. hash2 = H(msg2)
  126. print hash1
  127. PHKPFOCZPLUCVK99GSSPZS9PIVRGLZCCZFQZFDQSSGDRNHWTBVFQPOSGSJ
  128. PO9G9CNWSYTGRCWYNAWZMJP
  129. print hash2
  130. PHKPFOCZPLUCVK99GSSPZS9PIVRGLZCCZFQZFDQSSGDRNHWTBVFQPOSGSJ
  131. PO9G9CNWSYTGRCWYNAWZMJP
  132. print hash1 == hash2, msg1 == msg2
  133. True False
  134. Attack 3: Prefix-zero non-randomness
  135. The security definitions for hash based signatures assume that the hash function is
  136. pseudo-random. However curl has non-random properties. This non-randomness
  137. includes the collisions/second-preimages properties shown above. We have also found
  138. another form of non-randomness. Namely two similar messages result in states that are
  139. different only by a positional shift.
  140. Prefix-zero non-randomness:
  141. I have highlighted the similarity in the output messages.
  142. msg1 = b'9999LOGGINS'
  143. msg2 = b'9LOGGINS'
  144. hash1 = H(msg1)
  145. hash2 = H(msg2)
  146. print hash1
  147. CUHDNR9BWKDDSGTNGFGF9WGTISDCCPKTVUZINXZWGOAPTYQZT99999Q9FS
  148. MVXBDHHECKCQNGIKOM9IJKF
  149. print hash2
  150. DNR9BWKDDSGTNGFGF9WGTISDCCPKTVUZINXZWGOAPTYQZT99999Q9FSMVX
  151. BDHHECKCQNGIKOM9IJKFEPU
  152. Note also the substring 99999 should a occur very infrequently, but we can anecdotally
  153. observed values of the initial state bleed into the final hash message. Furthermore we
  154. have observed clear difference patterns in the hash output when each third trit is
  155. different between two messages.
  156. Recommendations:
  157. We make the following recommendations:
  158. 1. We recommend that IOTA immediately stop relying on curl for
  159. cryptographic purposes and instead replace curl with a vetted and well studied
  160. cryptographic hash function such as MD6, BLAKE2, Grøstl, Skein, SHA-3 or
  161. SHA-256.
  162. 2. We recommend that as soon as possible exchanges and users are made
  163. aware of these weaknesses so that they can put mitigations in place to avoid
  164. potential lose of funds.
  165. Suggestions:
  166. In this section we provide suggestions on ways in which IOTA can achieve similar goals
  167. as curl while minimizing the risk. These suggestions should not be seen as
  168. endorsements, prior to implementing any of these suggestions consult with a
  169. professional cryptographer or crypto-engineer.
  170. 1. If the IOTA project wishes to use a cryptographic hash function different
  171. from other cryptocurrencies for the purposes of securing PoW from established
  172. ASIC miners we suggest that they use the MD6 hash function. And as far as we
  173. are aware MD6 is not currently being used by any cryptocurrency. We will
  174. assume the use of MD6 in the second suggestion, but other secure cryptographic
  175. hash function could be used.
  176. 2. If the IOTA project wishes to ensure that trinary logic is involved in the
  177. proof of work and signature hashing process we suggest that a trinary function
  178. could be composed with a secure hash algorithm in a construction such as:
  179. Hash(msg) = MD6(msg || TrinaryFunction(msg)).
  180. This would ensure that any cryptographic weakness in Hash would imply a
  181. cryptographic weakness in MD6. Thus making this scheme at least as secure as
  182. MD6 even if the TrinaryFunction is shown to be insecure.
  183. Letter #2
  184. Author: Sergey Ivancheglo
  185. Date: 15th of July
  186. Hello.
  187. Thank you for your interest to Curl and IOTA. I read your analysis, the phrase “we can
  188. break 24 of 27 rounds of curl” is really interesting. I’d like to ask how many transform()
  189. function invocations you need for that. It’s not clear if you meant only breaking collisionresistant
  190. part or one-wayness too, it’s pretty important to know because the security of
  191. IOTA signatures requires only the latter. I wish you have contacted me in advanced
  192. regarding the other attacks, what you identified as weaknesses is features added
  193. intentionally.
  194. Below I’ll explain every attack/feature in detail, but before that I’d like to remind about
  195. Keccak padding rule. I didn’t verify it but I suspect that without the padding rule Attack 2
  196. (Collisions resulting from failure to use message padding) is applicable to Keccak too.
  197. Just like Keccak, Curl is based on sponge construction, unlike Keccak, Curl has the
  198. padding rule moved outside to enable things, not possible in Keccak. One of those
  199. feature is an easy-to-find X = hash(X). This X is used as NULL transaction hash in IOTA
  200. and also as the genesis transaction, because it references itself. IOTA transactions
  201. don’t need the padding rule, they all have the fixed size of 8019 trits.
  202. Let’s look at Attack 1 based on prepending zeros. This feature is needed for IOTA to
  203. save resources for broadcasting/storing of transactions with short payload. Because of
  204. this the payload part (named “signatureMessageFragment”) goes in the very beginning
  205. before the header part. A single transaction can hold 6561 trits of payload, if a payload
  206. is just, for example, 486 trits then we can fill the first 6075 trits with zeros and save more
  207. than 75% of bandwidth/storage without changing anything else. The transaction hash
  208. will still be the same.
  209. Attack 2 scenario based on appending extra trits doesn’t affect IOTA negatively nor it
  210. gives any benefits. The transactions have the fixed size and data stored in the payload
  211. will use the padding rule explained below.
  212. While I was using “padding rule” phrase, technically Curl-related method used as a
  213. countermeasure against padding attacks, probably, can’t be called “padding rule”.
  214. Before absorbing a message of a variable size we are supposed to initialize the internal
  215. part of Curl state with the size of the message. Giving a user write access to the internal
  216. state may be a not very good idea in some use-cases, so we are considering replacing
  217. this method with absorbing the size trits before absorbing the message. In either case I
  218. believe the both attacks are counteracted, aren’t they?
  219. Now I’d like to move to Attack 3 (Prefix-zero non-randomness). You, probably, already
  220. noticed that the code of Curl is very simple. Making an algorithm as simple as possible
  221. makes analysis of the algorithm simple too (in most cases). Curl transformation function
  222. has such feature: the result of an analysis of a single output trit can be applied to all
  223. other output trits with a simple shifting. I treat it as an advantage, while most of the
  224. hashing algorithms are “protected” by obscurity of their internal mechanisms, Curl
  225. doesn’t have such drawback. “99999” in that very place of the output can be met in 1
  226. case of 3^(5*3). The chance to see at least one occurrence of “99999” is even higher. I
  227. think that “initial state bleed into the final hash” phrase needs a better proof than few
  228. anecdotal occurrences. Personally, I running statistical tests detected no correlation
  229. between input and output trits, of course, there is always a non-zero chance that my
  230. tests had a bug. Regarding “Furthermore we have observed clear difference patterns in
  231. the hash output when each third trit is different between two messages”, could you
  232. provide more details? It’s unclear what was meant. Human brain is notorious for seeing
  233. patterns where they don’t actually exist (like seeing faces in electricity sockets), a
  234. quantification of the patterns would be very helpful.
  235. In the end of my letter I’d like to address your recommendations and suggestions.
  236. “We recommend that IOTA immediately stop relying on curl for cryptographic purposes
  237. and instead replace curl with a vetted and well studied cryptographic hash function such
  238. as MD6, BLAKE2, Grøstl, Skein, SHA-3 or SHA-256.”
  239. Curl is based on the well-studied sponge construction. All the requirements are satisfied
  240. thus making Curl as secure as its transformation function. The function passed all
  241. standard tests (avalanche, trit-independence). Of course, vetting is a very important part
  242. and you are doing it now, so before rushing to follow the recommendation I’d like to get
  243. your answers, particularly about “24 of 27”.
  244. “We recommend that as soon as possible exchanges and users are made aware of
  245. these weaknesses so that they can put mitigations in place to avoid potential lose of
  246. funds.”
  247. We need to double-check the weaknesses before any publishing to ensure that what is
  248. being published is indeed based on sound evidences. We would love to carry on this
  249. conversation, would you guys be fine with being invited into the IOTA Foundation slack
  250. to discuss further with the rest of the team?
  251. “If the IOTA project wishes to use a cryptographic hash function different from other
  252. cryptocurrencies for the purposes of securing PoW from established ASIC miners we
  253. suggest that they use the MD6 hash function.”
  254. IOTA project doesn’t wish to use a cryptographic hash function different from other
  255. cryptocurrencies. It wishes to use a function which is fast, energy efficient and tiny
  256. codebase-wise.
  257. “If the IOTA project wishes to ensure that trinary logic is involved in the proof of work
  258. and signature hashing process we suggest that a trinary function could be composed
  259. with a secure hash algorithm in a construction…”
  260. This suggestion is not compatible with the wishes above, so first we are planning to
  261. assess severity of the weaknesses found by you.
  262. Looking forward to hearing from you soon,
  263. Sergey
  264. Letter #3
  265. Author: Ethan Heilman
  266. Date: 15th of July
  267. Hi Sergey,
  268. I don't have much time to work on this today, but I wanted to understand more about the
  269. cryptographic assumptions that IOTA is making and respond to two of your comments.
  270. >It’s not clear if you meant only breaking collision-resistant part or one-wayness too, it’s
  271. pretty important to know because the security of IOTA signatures requires only the
  272. latter.
  273. Can you provide some documentation that IOTA signatures only require that the
  274. function is a OWF (One Way Function) and not a PRF (Pseudo Random Family). This
  275. paper [0] reduces the Winternitz one-time signature scheme to the PRF property of a
  276. function not onewayness. You can break PRness without breaking one-wayness.
  277. >Curl is based on the well-studied sponge construction. All the requirements are
  278. satisfied thus making Curl as secure as its transformation function. The function passed
  279. all standard tests (avalanche, trit-independence). Of course, vetting is a very important
  280. part and you are doing it now, so before rushing to follow the recommendation I’d like to
  281. get your answers,
  282. As a participant in the SHA-3 hash function contest who broke one of the 51 Round-1
  283. SHA-3 proposals and who worked on security proofs for another SHA-3 proposal I can
  284. say with some authority that using the sponge construction and showing statistical
  285. properties of the transformation function is not sufficient to ensure security. Of the 51
  286. Round-1 SHA-3 proposals all of them passed statistical tests and at least one round of
  287. review by NIST yet 33/51 were broken.
  288. A more general point is that you should never roll your own crypto and if you must then
  289. it should be submitted for peer review by cryptographers before using it in a security
  290. critical application.
  291. >I read your analysis, the phrase “we can break 24 of 27 rounds of curl” is really
  292. interesting. I’d like to ask how many transform() function invocations you need for that.
  293. We have a differential path that propagates as a single difference until the 15th round of
  294. the transform function. Based on the per round diffusion we believe if extend this attack
  295. to result in a single difference until the 18th round, we will be able to create collisions
  296. with high probability for random states by ensuring that all differences that exist only
  297. occur with state[0:243] at the end of a transform. It should work for any number of
  298. transform invocations greater than 1.
  299. Thanks for the fast response,
  300. Ethan
  301. Letter #4
  302. Author: Sergey Ivancheglo
  303. Date: 15th of July
  304. Hi Ethan,
  305. Unfortunately, we don’t have the documentation you asked for, it’s work-in-progress. I
  306. checked the paper you linked to and think that we can’t rely on it. Unlike conventional
  307. signatures, IOTA signatures don’t need to be non-repudiable and this relaxes security
  308. assumptions. I “see” that one-wayness is enough for our case but it’s so obvious to me
  309. that I have no idea where to start from to show this to the others. I’m afraid I can’t
  310. provide a convincing proof within a reasonable timeframe. While it’s hard to prove that
  311. unicorns don’t exist it’s pretty easy to prove the opposite if we have one. Maybe you
  312. could show an example of a successful attack on IOTA signatures assuming that we
  313. use a one-way but non-resistant to collisions function?
  314. I agree that even perfect statistical properties of a transformation function are not
  315. enough to accept it as secure. At this point only unsuccessful attempts to break the
  316. function can increase our assurance but we’ll likely never reach 100% anyway, waiting
  317. indefinitely wasn’t a good way to launch IOTA so at one point we decided to do it.
  318. Not sure if David told you, the current version of Curl will be changed a little. Instead of
  319. X = F(A, B) we’ll be using X = F(A, B, C) where X is an output trit and A, B and C are
  320. input trits. Old design doesn’t provide good mixing, for example, after 10 rounds we still
  321. don’t get every output trit dependent on every input trit (only 718 of 729 trits are
  322. included, if I recall the number correctly) and the 11th round is required for 729 of 729.
  323. We also need to add at least 4 (= log2(9) rounded up) extra rounds to cover all input
  324. combinations because some combinations give an easy collision. 11+4 gives the lower
  325. bound of 15 rounds after which finding a collision becomes non-trivial. I’m curious if this
  326. 15 is the same 15 from your “We have a differential path that propagates as a single
  327. difference until the 15th round of the transform function”, is the 15th round included or
  328. not?
  329. Sergey
  330. Letter #5
  331. Author: Dominik Schiener
  332. Date: 17th of July
  333. Hey guys,
  334. Should we invite you all into our Slack where we can continue the conversation in real
  335. time?
  336. As I have mentioned to Ethan, we should definitely discuss a financial reward for the
  337. findings and also discuss how we proceed with fixing amd disclosing this.
  338. All the best
  339. Dominik
  340. Letter #6
  341. Author: Ethan Heilman
  342. Date: 19th of July
  343. Dominik pinged me on twitter, in response I'm sending out a short email summarizing
  344. current state of things. Nothing has really changed because we haven't had much time
  345. to work on things.
  346. 1. Curl's collision and second preimage resistance are broken when used as a hash
  347. function,
  348. 2. IOTA isn't using curl as a hash function but instead using it as a function which maps
  349. fixed length tryte strings to fixed length tryte strings.
  350. 3. Even when used in this setting Curl is not pseudo-random. It is unclear if this breaks
  351. the signature scheme used by IOTA because the signature scheme used by IOTA is not
  352. well documented and does not have security arguments. As far as I can tell most hashbased
  353. WOTS schemes can be reduced to the PRF property of the hash function.
  354. We can't attack the signature scheme until we understand it, and understanding a
  355. signature scheme from source code alone is a time intensive process.
  356. 4. I would strongly recommend IOTA move to a vetted and peer-reviewed hash function
  357. for their signature scheme. There are several lightweight hash functions designs
  358. available that have been studied (although not as well as SHA-3 or SHA256):
  359. https://www.cryptolux.org/index.php/Lightweight_Hash_Functions
  360. Ask any cryptographer, they will tell you running custom crypto primitives in production
  361. is very dangerous and violates basic industry best practices. The number one rule of
  362. cryptography is "Don't invent your own."
  363. http://www.lauradhamilton.com/10-cryptography-mistakes-amateurs-make
  364. https://twitter.com/petertoddbtc/status/714447656928415744
  365. Thanks,
  366. Ethan
  367. Letter #7
  368. Author: David Sønstebø
  369. Date: 19th of July
  370. Hey Ethan,
  371. Thanks a lot for the effort you are putting in. There's a lot here that would be very good
  372. to discuss in a more elucidating fashion in a fora where we can go back and forth, it's
  373. hard to get to the nuances without waiting weeks while conversing through mail. I will
  374. sent an invite to the Slack now, if you join I think we can make great progress on this.
  375. re: 'Don't roll your own' we have been very much aware of this since the beginning,
  376. naturally, but since we built it on top of Keccak proven sponge construction, we feel that
  377. it's not as much "rolling ones own" as rather optimizing preexisting proven principles.
  378. Best,
  379. Davd
  380. Letter #8
  381. Author: David Sønstebø
  382. Date: 20th of July
  383. Hey Ethan,
  384. Did you receive the invite? We can also setup a chat with our ex-NSA post-Quantum
  385. hash function experts after we get the initial confusion out of the way.
  386. Best,
  387. David
  388. Letter #9
  389. Author: Neha Narula
  390. Date: 20th of July
  391. Hello all,
  392. Very nice to e-meet you!
  393. From my perspective, it would be great to continue the discussion over email -- I'm
  394. experiencing Slack fatigue.
  395. Perhaps we could all just commit to responding faster? Feel free to cc anyone you think
  396. is important to include in the discussion.
  397. Best,
  398. Neha
  399. Letter #10
  400. Author: David Sønstebø
  401. Date: 20th of July
  402. Hello Neha,
  403. long time no speak.
  404. While I certainly understand Slack fatigue (we got the biggest slack in all of crypto and
  405. have to deal with way too many msgs daily), I want to really push on this. Responding
  406. via email will simply not be sufficient to hash out the nuances of this topic in a timely
  407. fashion, will at least take several weeks. What could be achieved in 1 hour Slack chat
  408. will take at least a month via mail.
  409. Best,
  410. David
  411. Letter #11
  412. Author: Ethan Heilman
  413. Date: 22nd of July
  414. IOTA team,
  415. We can now create collisions of messages of the same size (examples follow at the end
  416. of this email). This appears to break the standard definition of security for signature
  417. schemes called EU-CMA (Existential Unforgeability under a Chosen Message Attack)
  418. [0]. Can you confirm that IOTA’s signature scheme is indeed not EU-CMA secure?
  419. We note these collisions result from the exceptionally poor performance of curl’s
  420. transform function when attacked by textbook differential cryptanalysis attack. We hope
  421. this demonstrates that merely employing a sponge construction is not a sufficient
  422. condition for security and that IOTA does indeed meet the definition of rolling their own
  423. crypto.
  424. • We recommend in the strongest possible terms that you stop deploying inhouse
  425. developed cryptography in production and immediately switch to
  426. standardized and peer reviewed libraries and designs.
  427. • We recommend that any cryptography and signature algorithms used in
  428. IOTA be well documented and submitted for public review prior to their
  429. introduction into production software given the potential risk of a loss of funds to
  430. the public. This documentation should include any non-standard security
  431. assumptions and detailed formal arguments of security.
  432. As discussed earlier we are planning on publishing these weaknesses within a week or
  433. so. Please inform us what immediate mitigation steps you taking so that we can
  434. coordinate the public release of these weaknesses.
  435. Thanks,
  436. Ethan
  437. Attack on EU-CMA security of IOTA’s signature scheme
  438. We base this on the following description of the signature scheme used in IOTA.
  439. hashedmsg = Curl(msg)
  440. sig = Sign(SecretKey, hashedmsg)
  441. We present the following attack on the EU-CMA security of the signature scheme used
  442. in IOTA.
  443. 1. Eve chooses two messages, msg1, msg2 such that:
  444. curl(msg1) = curl(msg2) and msg1 != msg2
  445. 2. Eve sends msg1 to Alice and asks Alice to sign it.
  446. 3. Alice sends Eve a signature on msg1:
  447. sig1 = signature(SK, curl(msg1))
  448. 4. Eve produces a valid signature,message pair (sig1,msg2) where msg1 is a message
  449. which Alice’s has not signed thus breaking CMA-unforgability.
  450. signature(SK, curl(msg1)) = signature(SK, curl(msg2))
  451. Example collision:
  452. We have verified these collisions using the ccurl-digest tool. We used the lyrics to the
  453. 80’s hit single “push it to the limit” in the colliding messages to demonstrate that we fully
  454. collide the internal state of curl and thus have arbitrary control over most of the
  455. message. We note that this internal state collision enables us to instantly create millions
  456. of other colliding messages.
  457. $ ./ccurl-digest
  458. RETHT9ES9HRCUITBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZ
  459. HFZEHGATZXZAUPGVEKNMQXFVRXHF9QJQHUTILIPIXUYRVSJEIOJDRIUVWMUA
  460. BSIKIBAKENE9KVFJUEQUHFRVGELFGJIDXQARWH99XTORHXRETHT9ES9HRCUI
  461. TBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZHFZEHGATZXZAUP
  462. GVEKNMQXFVRPUSHITTOTHELIMIT9WALKALONGTHERAZORSEDGE9BUTDONT
  463. LOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBEFINISHED99OPENUPTHELIMIT9
  464. PASTTHEPOINTOFNORETURN9YOUVEREACHEDTHETOPBUTSTILLYOUGOTTAL
  465. EARN9HOWTOKEEPIT99HITTHEWHEELANDDOUBLETHESTAKES9THROTTLEWID
  466. EOPENLIKEABATOUTOFHELL9YOUCRASHTHEGATESCRASHTHEGATES9GOING
  467. FORTHEBACKOFBEYOND9NOTHINGGONNASTOPYOUTHERESNOTHINGTHATST
  468. RONG9SOCLOSENOWYOURENEARLYATTHEBRINK9SOPUSHITOOHYEAH99WEL
  469. COMETOTHELIMITLIMIT9TAKEITBABYONESTEPMORE9THEPOWERGAMESSTILL
  470. PLAYINGSO9YOUBETTERWINIT99PUSHITTOTHELIMITLIMIT9NOONELEFTTOSTA
  471. NDINYOURWAY9YOUMIGHTGETCARELESSBUTYOULLNEVERBESAFE9WHILEYO
  472. URESTILLINIT99WELCOMETOTHELIMITLIMIT9STANDINGONTHERAZORSEDGE9D
  473. ONTLOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBEFINISHED99WELCOMETOT
  474. HELIMIT9PUSHITTOTHELIMITPUSHITTOTHELIMIT9WALKALONGTHERAZORSEDG
  475. E9BUTDONTLOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBEFINISHED99OPENU
  476. PTHELIMIT9PASTTHEPOINTOFNORETURN9YOUVEREACHEDTHETOPBUTSTILLY
  477. OUGOTTALEARN9HOWTOKEEPIT99HITTHEWHEELANDDOUBLETHESTAKES9TH
  478. ROTTLEWIDEOPENLIKEABATOUTOFHELL9YOUCRASHTHEGATESCRASHTHEGA
  479. TES9GOINGFORTHEBACKOFBEYOND9NOTHINGGONNASTOPYOUTHERESNOTH
  480. INGTHATSTRONG9SOCLOSENOWYOURENEARLYATTHEBRINK9SOPUSHITOOH
  481. YEAH99WELCOMETOTHELIMITLIMIT9TAKEITBABYONESTEPMORE9THEPOWER
  482. GAMESSTILLPLAYINGSO9YOUBETTERWINIT99PUSHITTOTHELIMITLIMIT9NOON
  483. ELEFTTOSTANDINYOURWAY9YOUMIGHTGETCARELESSBUTYOULLNEVERBESA
  484. FE9WHILEYOURESTILLINIT99WELCOMETOTHELIMITLIMIT9STANDINGONTHERA
  485. ZORSEDGE9DONTLOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBEFINISHED99
  486. WELCOMETOTHELIMIT9PUSHITTOTHELIMITPUSHITTOTHELIMIT9WALKALONGT
  487. HERAZORSEDGE9BUTDONTLOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBEFIN
  488. ISHED99OPENUPTHELIMIT9PASTTHEPOINTOFNORETURN9YOUVEREACHEDTH
  489. ETOPBUTSTILLYOUGOTTALEARN9HOWTOKEEPIT99HITTHEWHEELANDDOUBLE
  490. THESTAKES9THROTTLEWIDEOPENLIKEABATOUTOFHELL9YOUCRASHTHEGATE
  491. SCRASHTHEGATES9GOINGFORTHEBACKOFBEYOND9NOTHINGGONNASTOPYO
  492. UTHERESNOTHINGTHATSTRONG9SOCLOSENOWYOURENEARLYATTHEBRINK9
  493. SOPUSHITOOHYEAH99WELCOMETOTHELIMITLIMIT9TAKEITBABYONESTEPMOR
  494. E9THEPOWERGAMESSTILLPLAYINGSO9YOUBETTERWINIT99PUSHITTOTHELIMI
  495. TLIMIT9NOONELEFTTOSTANDINYOURWAY9YOUMIGHTGETCARELESSBUTYOUL
  496. LNEVERBESAFE9WHILEYOURESTILLINIT99WELCOMETOTHELIMITLIMIT9STANDI
  497. NGONTHERAZORSEDGE9DONTLOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBE
  498. FINISHED99WELCOMETOTHELIMIT9PUSHITTOTHELIMITPUSHITTOTHELIMIT9WA
  499. LKALONGTHERAZORSEDGE9BUTDONTLOOKDOWNJUSTKEEPYOURHEAD9ORY
  500. OULLBEFINISHED99OPENUPTHELIMIT9PASTTHEPOINTOFNORETURN9YOUVER
  501. EACHEDTHETOPBUTSTILLYOUGOTTALEARN9HOWTOKEEPIT99HITTHEWHEELA
  502. NDDOUBLETHESTAKES9THROTTLEWIDEOPENLIKEABATOUTOFHELL9YOUCRA
  503. SHTHEGATESCRASHTHEGATES9
  504. BUWSNIAGAYCVUPGUJMWIIYHR9DQAPVHRKHXPJKB9BTCKPUXTFSNPXIBHCIIY
  505. CJRAQJOGHXEYLXSJURUFS
  506. $ ./ccurl-digest
  507. RETHT9ES9HRCUITBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZ
  508. HFZEHGATZXZAUPGVEKNMQXFVRXHF9QJQHUTILIPIXUYRVSJEIPJDRIUVWMUA
  509. BSIKIBAKENE9KVFJUEQUHFRVGELFGJIDXQARWH99XTORHXRETHT9ES9HRCUI
  510. TBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZHFZEHGATZXZAUP
  511. GVEKNMQXFVRPUSHITTOTHELIMIT9WALKALONGTHERAZORSEDGE9BUTDONT
  512. LOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBEFINISHED99OPENUPTHELIMIT9
  513. PASTTHEPOINTOFNORETURN9YOUVEREACHEDTHETOPBUTSTILLYOUGOTTAL
  514. EARN9HOWTOKEEPIT99HITTHEWHEELANDDOUBLETHESTAKES9THROTTLEWID
  515. EOPENLIKEABATOUTOFHELL9YOUCRASHTHEGATESCRASHTHEGATES9GOING
  516. FORTHEBACKOFBEYOND9NOTHINGGONNASTOPYOUTHERESNOTHINGTHATST
  517. RONG9SOCLOSENOWYOURENEARLYATTHEBRINK9SOPUSHITOOHYEAH99WEL
  518. COMETOTHELIMITLIMIT9TAKEITBABYONESTEPMORE9THEPOWERGAMESSTILL
  519. PLAYINGSO9YOUBETTERWINIT99PUSHITTOTHELIMITLIMIT9NOONELEFTTOSTA
  520. NDINYOURWAY9YOUMIGHTGETCARELESSBUTYOULLNEVERBESAFE9WHILEYO
  521. URESTILLINIT99WELCOMETOTHELIMITLIMIT9STANDINGONTHERAZORSEDGE9D
  522. ONTLOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBEFINISHED99WELCOMETOT
  523. HELIMIT9PUSHITTOTHELIMITPUSHITTOTHELIMIT9WALKALONGTHERAZORSEDG
  524. E9BUTDONTLOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBEFINISHED99OPENU
  525. PTHELIMIT9PASTTHEPOINTOFNORETURN9YOUVEREACHEDTHETOPBUTSTILLY
  526. OUGOTTALEARN9HOWTOKEEPIT99HITTHEWHEELANDDOUBLETHESTAKES9TH
  527. ROTTLEWIDEOPENLIKEABATOUTOFHELL9YOUCRASHTHEGATESCRASHTHEGA
  528. TES9GOINGFORTHEBACKOFBEYOND9NOTHINGGONNASTOPYOUTHERESNOTH
  529. INGTHATSTRONG9SOCLOSENOWYOURENEARLYATTHEBRINK9SOPUSHITOOH
  530. YEAH99WELCOMETOTHELIMITLIMIT9TAKEITBABYONESTEPMORE9THEPOWER
  531. GAMESSTILLPLAYINGSO9YOUBETTERWINIT99PUSHITTOTHELIMITLIMIT9NOON
  532. ELEFTTOSTANDINYOURWAY9YOUMIGHTGETCARELESSBUTYOULLNEVERBESA
  533. FE9WHILEYOURESTILLINIT99WELCOMETOTHELIMITLIMIT9STANDINGONTHERA
  534. ZORSEDGE9DONTLOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBEFINISHED99
  535. WELCOMETOTHELIMIT9PUSHITTOTHELIMITPUSHITTOTHELIMIT9WALKALONGT
  536. HERAZORSEDGE9BUTDONTLOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBEFIN
  537. ISHED99OPENUPTHELIMIT9PASTTHEPOINTOFNORETURN9YOUVEREACHEDTH
  538. ETOPBUTSTILLYOUGOTTALEARN9HOWTOKEEPIT99HITTHEWHEELANDDOUBLE
  539. THESTAKES9THROTTLEWIDEOPENLIKEABATOUTOFHELL9YOUCRASHTHEGATE
  540. SCRASHTHEGATES9GOINGFORTHEBACKOFBEYOND9NOTHINGGONNASTOPYO
  541. UTHERESNOTHINGTHATSTRONG9SOCLOSENOWYOURENEARLYATTHEBRINK9
  542. SOPUSHITOOHYEAH99WELCOMETOTHELIMITLIMIT9TAKEITBABYONESTEPMOR
  543. E9THEPOWERGAMESSTILLPLAYINGSO9YOUBETTERWINIT99PUSHITTOTHELIMI
  544. TLIMIT9NOONELEFTTOSTANDINYOURWAY9YOUMIGHTGETCARELESSBUTYOUL
  545. LNEVERBESAFE9WHILEYOURESTILLINIT99WELCOMETOTHELIMITLIMIT9STANDI
  546. NGONTHERAZORSEDGE9DONTLOOKDOWNJUSTKEEPYOURHEAD9ORYOULLBE
  547. FINISHED99WELCOMETOTHELIMIT9PUSHITTOTHELIMITPUSHITTOTHELIMIT9WA
  548. LKALONGTHERAZORSEDGE9BUTDONTLOOKDOWNJUSTKEEPYOURHEAD9ORY
  549. OULLBEFINISHED99OPENUPTHELIMIT9PASTTHEPOINTOFNORETURN9YOUVER
  550. EACHEDTHETOPBUTSTILLYOUGOTTALEARN9HOWTOKEEPIT99HITTHEWHEELA
  551. NDDOUBLETHESTAKES9THROTTLEWIDEOPENLIKEABATOUTOFHELL9YOUCRA
  552. SHTHEGATESCRASHTHEGATES9
  553. BUWSNIAGAYCVUPGUJMWIIYHR9DQAPVHRKHXPJKB9BTCKPUXTFSNPXIBHCIIY
  554. CJRAQJOGHXEYLXSJURUFS
  555. Shorter colliding messages are also possible for instance:
  556. msg1 =
  557. "RETHT9ES9HRCUITBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZ
  558. HFZEHGATZXZAUPGVEKNMQXFVRXHF9QJQHUTILIPIXUYRVSJEIOJDRIUVWMUA
  559. BSIKIBAKENE9KVFJUEQUHFRVGELFGJIDXQARWH99XTORHXRETHT9ES9HRCUI
  560. TBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZHFZEHGATZXZAUP
  561. GVEKNMQXFVR"
  562. msg2 =
  563. "RETHT9ES9HRCUITBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZ
  564. HFZEHGATZXZAUPGVEKNMQXFVRXHF9QJQHUTILIPIXUYRVSJEIPJDRIUVWMUA
  565. BSIKIBAKENE9KVFJUEQUHFRVGELFGJIDXQARWH99XTORHXRETHT9ES9HRCUI
  566. TBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZHFZEHGATZXZAUP
  567. GVEKNMQXFVR"
  568. Results in a colliding hash.
  569. Letter #12
  570. Author: David Sønstebø
  571. Date: 23
  572. rd of July
  573. Hello Ethan,
  574. Thanks for the continued effort. We will have a thorough response tomorrow and then
  575. we can hopefully come to consensus on the next steps.
  576. Re:
  577. "As discussed earlier we are planning on publishing these weaknesses within a week or
  578. so. Please inform us what immediate mitigation steps you taking so that we can
  579. coordinate the public release of these weaknesses."
  580. This is also something we obviously need to discuss in some depth as well, I presume
  581. that you also see it as axiomatic and agree that rush-publishing this would be very
  582. detrimental and irresponsible. Presuming your findings are correct (tomorrow's
  583. response will elucidate this further) a change to the protocol on this level will take
  584. several weeks to resolve on a technical level, not to mention logistics. One step at a
  585. time: let's first see eye to eye on the actual issue at hand. I am confident that you guys
  586. are in agreement with this.
  587. Thanks,
  588. All the best,
  589. David
  590. Letter #13
  591. Author: David Sønstebø
  592. Date: 23rd of July
  593. For some reason Mail.ru has some issues, so I have to send the mail along for Sergey:
  594. "Hi,
  595. Yesterday David promised to provide a thorough response. Unfortunately, I still haven’t
  596. got an answer to my question from the very first letter, without that the leap of faith is
  597. required to follow your recommendations. The question was:
  598. How many transform() function invocations do you need to “break 24 of 27 rounds of
  599. curl”?
  600. (You have broken 27 rounds too, the corresponding number of transformations for 27
  601. rounds together with 24 rounds would let me assess if your analysis is more efficient
  602. than the analysis utilizing properties of function F(A, B).)
  603. PS: By the way, please, use “Curl-P-27” name instead of “curl” to conform to the naming
  604. convention where “P” stands for “prototype” (i.e. Curl version with 2-argument truth table
  605. function instead of the 3-argument one) and “27” shows the number of rounds in
  606. transform() function.
  607. Sergey"
  608. Letter #14
  609. Author: Ethan Heilman
  610. Date: 23rd of July
  611. Hi Sergey,
  612. >How many transform() function invocations do you need to “break 24 of 27 rounds of
  613. curl”?
  614. I believe I answered that question in the second email when I wrote:
  615. ">I read your analysis, the phrase “we can break 24 of 27 rounds of curl” is really
  616. interesting. I’d like to ask how many transform() function invocations you need for that.
  617. We have a differential path that propagates as a single difference until the 15th round of
  618. the transform function. Based on the per round diffusion we believe if extend this attack
  619. to result in a single difference until the 18th round, we will be able to create collisions
  620. with high probability for random states by ensuring that all differences that exist only
  621. occur with state[0:243] at the end of a transform. It should work for any number of
  622. transform invocations greater than 1."
  623. Perhaps I misunderstood your question. Were you asking how many queries to the
  624. transform function were necessary to prevent diffusion to 15-th round? If so, here is my
  625. answer:
  626. The attack I described involves finding a series of equations which if satisfied prevent
  627. the diffusion of a single trit for 14 rounds (diffusion then begins in the 15th round). Our
  628. attack relies on finding two message blocks, MB1 and MB2 which meet the equations.
  629. MB1 is determined by making random queries to the transform until the equation is
  630. satisfied, around 30-40 queries to transform. The second MB2 is just determined by the
  631. equations, i.e., 0 queries to the transform.
  632. As predicted we extended this attack to the 20-th round (thereby enabling a 27th round
  633. collision). However, we noticed that things were worse than we originally thought and
  634. we didn't actually need to solve the equations out to 14 rounds. Instead we only use
  635. these equations for the first 8 rounds and then just rely on the poor differential
  636. properties of F(A,B) to brute force the next 11-12 rounds. Not sure exactly how many
  637. transform queries we are calling, I just let my slow python code run over night on my
  638. laptop.
  639. > By the way, please, use “Curl-P-27” name instead of “curl” to conform to the naming
  640. convention where “P” stands for “prototype” (i.e. Curl version with 2-argument truth table
  641. function instead of the 3-argument one) and “27” shows the number of rounds in
  642. transform() function.
  643. I am shocked that you would call a hash function deployed in production, with "a 800
  644. million dollar bug bounty" as Dominik put it, a prototype. Are you telling me the IOTA
  645. project deployed "prototype crypto" in production?
  646. Is this 3-argument version of curl documented anywhere?
  647. I am becoming increasingly concerned that you are going to just patch curl and not
  648. switch to a well vetted standardized secure hash function. Can you confirm that you are
  649. not going to do this?
  650. Thanks,
  651. Ethan
  652. Letter #15
  653. Author: Sergey Ivancheglo
  654. Date: 24th of July
  655. Hi Ethan,
  656. Thanks for the reply. I wasn’t asking how many queries to the transform function had
  657. been necessary to prevent diffusion to 15-th round. My question was aimed to assess
  658. complexity of your attack, but now I see that I misunderstood you. I was thinking that
  659. you had found an attack allowing to generate an arbitrary collision (“selective forgery” in
  660. the classical terminology), after reading your extended explanation I see that it’s not the
  661. case.
  662. > We note these collisions result from the exceptionally poor performance of curl’s
  663. transform function…
  664. > … just rely on the poor differential properties of F(A,B) to brute force the next 11-12
  665. rounds
  666. If you look at Keccak round function you will see that it diffuses inputs with a higher
  667. strength than Curl round function, a single Keccak round equals to several Curl rounds.
  668. Fine-graininess of Curl gives us what Keccak can’t give – fine-grain control over
  669. performance and energy consumption. We contacted you ~3 months ago regarding
  670. reviewing Curl, I wish you would have replied back then before starting your analysis,
  671. this would save a lot of time for you… In order to ensure no more time gets wasted on
  672. either side, I want to give a basic overview of Curl, which I believe will clear up some of
  673. the misunderstanding that seem to be present in our dialog.
  674. Curl is a hash function based on the sponge construction. Its round function is very
  675. simple to allow easy algebraic analysis of Curl structure which is very important
  676. because we need to get lower bounds on the number of the rounds in different usecases.
  677. In other words, we could use 27 rounds for one-wayness, 6 rounds for string
  678. hashing, 45 rounds for collision resistance, 21 rounds for key generation, 39 rounds for
  679. pseudo-random number generation, you’ve got the idea. This feature is so important
  680. that it’s reflected in the name of the function – Curl. Each round is a single curl, more
  681. curls – more beautiful (more secure) our haircut (our hash function) is. One size doesn’t
  682. fit all - http://keccak.noekeon.org/is_sha3_slow.html shows how Keccak solves the
  683. problem of universalism (spoiler: it solves it in the same way, just abandons
  684. universalism).
  685. …Now, after the short introduction, I’m moving to the other issues.
  686. > 1. Curl's collision and second preimage resistance are broken when used as a hash
  687. function,
  688. So far you have broken them for Curl-P-1, Curl-P-2, …, Curl-P-26, Curl-P-27 functions,
  689. I’d like to know your assessment on the min number of rounds which makes your attack
  690. infeasible. This may be useful if we decide to unlock “repudiation” before Curl-729-R
  691. (with the 3-argument truth table) is ready. By the way, we don’t run a competition similar
  692. to http://keccak.noekeon.org/crunchy_contest.html but we will include your findings if we
  693. do.
  694. > 2. IOTA isn't using curl as a hash function but instead using it as a function which
  695. maps fixed length tryte strings to fixed length tryte strings.
  696. Not entirely sure what you mean, maybe you omitted “cryptographic” in front of “hash
  697. function”? In this case you are right, second-preimage resistance is an anti-feature,
  698. collision resistance threat is nullified by Coordinator while allows us to easily attack
  699. scam-driven copycats. One of such copycat even conducted a sophisticated scam using
  700. 99% of IOTA codebase, they got published on https://cointelegraph.com/news/cryptoworld-has-been-turning-into-ponzi-scheme-opinion,
  701. simulate activity
  702. on https://twitter.com/Aidos_kuneen and were even listed on CoinMarketCap.com
  703. according
  704. to https://mobile.twitter.com/Aidos_kuneen/status/876042685563514880/photo/1. As
  705. you are well aware, this space is riddled in scammers, and sometimes scammers can
  706. hurt the reputation of honest projects, so having such a simple fix to mitigate them is a
  707. bonus.
  708. > 3. Even when used in this setting Curl is not pseudo-random.
  709. Could you tell what randomness tests are not passed by Curl-P-27?
  710. > …We present the following attack on the EU-CMA security of the signature scheme
  711. used in IOTA…
  712. Your attack is based on a wrong assumption about IOTA signing scheme. As you know,
  713. some signing schemes counteract your scenario by higher level protocols (e.g. RSA),
  714. IOTA follows the same route. Let’s apply your findings on the actual scheme, do you
  715. have time for that? If yes, then IOTA team will prioritize the documentation.
  716. > We can now create collisions of messages of the same size (examples follow at the
  717. end of this email). This appears to break the standard definition of security for signature
  718. schemes called EU-CMA (Existential Unforgeability under a Chosen Message Attack)
  719. [0]. Can you confirm that IOTA’s signature scheme is indeed not EU-CMA secure?
  720. I claim that IOTA’s signature scheme is EU-CMA secure, to prove that I’ll need some
  721. time, but your reply to this email will clarify some issues and make it easier to prove this
  722. to you.
  723. > We recommend in the strongest possible terms that you stop deploying in-house
  724. developed cryptography in production and immediately switch to standardized and peer
  725. reviewed libraries and designs.
  726. Your recommendation makes perfect sense, but before that we need to get a 3rd-party
  727. confirmation, this will take some time. I also want to highlight here that we are working
  728. with multiple security researchers, cryptographers, mathematicians, students and
  729. universities with supercomputers (Imperial College London and St. Petersburg
  730. Polytechnic University) to verify our assumptions both in IOTA consensus as well as
  731. Curl cryptography. This is not something we take lightly, we are very aware of the
  732. security risks involved and therefore approach it in a measured fashion while also
  733. pushing for progress.
  734. > I am shocked that you would call a hash function deployed in production, with "a 800
  735. million dollar bug bounty" as Dominik put it, a prototype.
  736. I see Greek wasn’t your favorite subject in school :), don’t worry, word “prototype” is
  737. similar to https://en.wikipedia.org/wiki/Prototype_pattern, not to what you thought about.
  738. It is also important to keep in mind that all distributed ledgers are currently in a
  739. “prototype phase“.
  740. > Is this 3-argument version of curl documented anywhere?
  741. No, it’s still being tested and these tests by nature will take several months.
  742. > I am becoming increasingly concerned that you are going to just patch curl and not
  743. switch to a well vetted standardized secure hash function. Can you confirm that you are
  744. not going to do this?
  745. We are definitely not going to “just patch curl”, we are going to get 3rd-party audit of
  746. your claims and then follow your recommendations (if the auditors greenlight them). I
  747. want to reassure you that we very much appreciate your input and that we take it
  748. seriously, this is why we reached out to you in the first place 3 months ago as well. We
  749. are already checking this now with two 3rd parties, including our own inhouse
  750. cryptographers and mathematicians. We appreciate your understanding that this will
  751. take some time, but your response to this mail will be very helpful in gauging the exact
  752. issue and provide ETA, then we can coordinate on the next steps (implementation
  753. change, publication etc.)
  754. PS: I'm CCing Paul and Alon, they are devs who will be working on the changes.
  755. Thanks,
  756. Sergey
  757. Letter #16
  758. Author: Ethan Heilman
  759. Date: 25th of July
  760. IOTA team,
  761. 1. It has been 11 days since we first contacted you. Please send us a concrete timeline
  762. detailing when you are planning replace curl with standard and peer-reviewed
  763. cryptography?
  764. >universities with supercomputers (Imperial College London and St. Petersburg
  765. Polytechnic University) to verify our assumptions both in IOTA consensus as well as
  766. Curl cryptography.
  767. 2. Please CC us on any communications with other cryptographers as this our
  768. unpublished research you are disseminating. If you would prefer we could use our
  769. relationships with cryptographers at MIT, BU and elsewhere. As mentioned earlier we
  770. did consult informally with additional subject matter experts.
  771. >Your attack is based on a wrong assumption about IOTA signing scheme.
  772. 3. Can you explain your signature scheme then? When generating a signature do you
  773. or do you not hash the message? We have looked in multiple implementations and it
  774. appears that you do. If you do then our attack holds and your signing scheme EU-CMA
  775. forgery depends on the collision resistance of curl.
  776. 4. We have heard vague rumors of another team with attacks against curl. Hopefully
  777. they are also doing a responsible disclosure progress with you. If such attacks are
  778. made public it does not make sense for us to withhold publication.
  779. >I’d like to know your assessment on the min number of rounds which makes your
  780. attack infeasible. This may be useful if we decide to unlock “repudiation” before Curl729-R
  781. (with the 3-argument truth table) is ready. By the way, we don’t run a competition
  782. similar to http://keccak.noekeon.org/crunchy_contest.html but we will include your
  783. findings if we do.
  784. 5. This sounds very much like you are going to increase the number of rounds in curl
  785. and update the transformation function. I would strongly recommend against continuing
  786. to roll your own crypto.
  787. These attacks we have developed will always get better. The current results are from
  788. roughly 20 hours of work. Even teams of experts in symmetric cryptography make
  789. mistakes which is we have decade long competitions to choose new symmetric
  790. primitives.
  791. Thanks,
  792. Ethan
  793. Letter #17
  794. Author: Sergey Ivancheglo
  795. Date: 25th of July
  796. Hi, Ethan
  797. > 1. It has been 11 days since we first contacted you. Please send us a concrete
  798. timeline detailing when you are planning replace curl with standard and peer-reviewed
  799. cryptography?
  800. Such a procedure is not done overnight obviously. We have been very responsive on
  801. this matter and have internally prioritized it over any other project we have currently ongoing.
  802. Apart from validating the claims put forth, we are currently assessing how to best
  803. integrate a peer-reviewed hash function (4 of our developers are working on this). Here
  804. is a proposed timeline:
  805. 5th of August – We change the code to replace Curl with Keccak. This means that the
  806. Core client, libraries and wallets will be updated by then.
  807. 5th of August – 10th of August – Users move their tokens to addresses generated with
  808. Keccak
  809. 12th of August – the day when we disclose the details
  810. As you know, the worst thing to do at this stage is to release a rushed fix. Which is why
  811. we are taking extra effort in ensuring that these drastic changes to the software are
  812. done securely, while also taking the time into account (we want this done as soon as
  813. possible as well). I hope you understand this and agree with the proposed timeline. We
  814. will further communicate any changes, updates and proposals to you for review.
  815. > 2. Please CC us on any communications with other cryptographers as this our
  816. unpublished research you are disseminating. If you would prefer we could use our
  817. relationships with cryptographers at MIT, BU and elsewhere. As mentioned earlier we
  818. did consult informally with additional subject matter experts.
  819. Will CC for sure. Thank you for your offer, for now we are focusing on having the
  820. transition to Keccak done in time. Indeed please disclose who you have talked to about
  821. this.
  822. > 3. Can you explain your signature scheme then? When generating a signature do you
  823. or do you not hash the message? We have looked in multiple implementations and it
  824. appears that you do. If you do then our attack holds and your signing scheme EU-CMA
  825. forgery depends on the collision resistance of curl.
  826. Extra checks are done on higher level, we’ll provide documentation after the transition.
  827. > 4. We have heard vague rumors of another team with attacks against curl. Hopefully
  828. they are also doing a responsible disclosure progress with you. If such attacks are
  829. made public it does not make sense for us to withhold publication.
  830. There was a site on the Internet with “IOTA seed cracker”. We tested the code provided
  831. on that site but it didn’t help to crack a seed, we were unable to reach the author
  832. because of absence of his name and contact info. But apart from yourself, we have not
  833. heard about any other attacks on Curl. Maybe you can check with the source of the
  834. rumor if this is true and we can coordinate this with them as well?
  835. > 5. This sounds very much like you are going to increase the number of rounds in curl
  836. and update the transformation function. I would strongly recommend against continuing
  837. to roll your own crypto.
  838. We are not going to increase the number of rounds, we are already replacing Curl with
  839. Keccak. We will however continue the development of Curl and are putting up more
  840. considerable resources to do so. This will obviously only make it into the protocol after it
  841. has been vetted and peer reviewed.
  842. PS: Does the provided timeline fit into your plans?
  843. Sergey
  844. Letter #18
  845. Author: Neha Narula
  846. Date: 25th of July
  847. Hi Sergey,
  848. I would very much appreciate a pointer to where this is done in the code. Hopefully
  849. that's something you can accommodate relatively quickly, without waiting for the
  850. transition.
  851. Thank you,
  852. Neha
  853. Letter #19
  854. Author: Sergey Ivancheglo
  855. Date: 25th of July
  856. Hi, Neha
  857. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/TransactionValidator.j
  858. ava#L72
  859. Here the collision would invalidate a transaction if it adjusted “timestamp” to an invalid
  860. value.
  861. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/TransactionValidator.j
  862. ava#L77
  863. Here the collision would invalidate a transaction if it adjusted “value” to an invalid value.
  864. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/BundleValidator.java#
  865. L35
  866. Here the collision would invalidate a bundle if it broke “currentIndex” sequence or
  867. “lastIndex” didn’t match the real number of the transactions in the bundle.
  868. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/BundleValidator.java#
  869. L43
  870. Here the collision would invalidate the bundle if it changed the transferred value.
  871. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/BundleValidator.java#
  872. L73
  873. Here the collision would invalidate the bundle if it changed “address” field of a multi-sig
  874. address (there are no single-sig addresses in official wallet, all addresses are 2-of-2
  875. ones, but custom software might generate single-sig addresses).
  876. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/BundleValidator.java#
  877. L79
  878. Here the collision would invalidate the bundle if it changed the spending address.
  879. I don’t have the source code of the Coordinator on this notebook, the code is not public,
  880. but I can get it tomorrow if it’s important. The Coordinator is used as an extra protection
  881. measure. Particularly, it stores all transactions that reach it, this allows us to recover
  882. iotas sent to addresses with typo (we detect it because users usually publish the
  883. addresses on the tangle before usage), during the latest snapshot we used the
  884. Coordinator to restore iotas sent to addresses generated with the previous (now
  885. obsolete) address generation scheme.
  886. The above is the higher level protocol that I mentioned in previous letters. We are
  887. migrating to Keccak anyway, we’ll provide the proof of infeasibility of your attack after
  888. the transition.
  889. Best regards,
  890. Sergey
  891. Letter #20
  892. Author: Dominik Schiener
  893. Date: 27th of July
  894. Hey Neha and Ethan,
  895. we're currently working on the implementation and the new unit tests. Could we get
  896. some feedback with regards to the timeline? We are putting up more effort for testing,
  897. especially taking the user transition into account, but we think the proposed timeline
  898. makes a lot of sense and should be achievable.
  899. Best
  900. Dominik
  901. Letter #21
  902. Author: Sergey Ivancheglo
  903. Date: 27th of July
  904. Hi Ethan,
  905. I have already prepared the Coordinator for the transition (the others are still working on
  906. back- and front-end parts though). I removed unnecessary security checks and now
  907. IOTA can do an even higher CTPS, the unfortunate trade-off is, of course, that now
  908. scam copycats can do frivolous ICOs without us being able to prevent it anymore.
  909. Now I’m working on a paper addressing your claims and I have stumbled into something
  910. I can’t get. English is my third language, I would appreciate if you explained the
  911. following:
  912. On the 22nd of July you wrote:
  913. > We can now create collisions of messages of the same size (examples follow at the
  914. end of this email). This appears to break the standard definition of security for signature
  915. schemes called EU-CMA (Existential Unforgeability under a Chosen Message Attack)
  916. [http://www.cs.tau.ac.il/~canetti/f08-materials/scribe8.pdf].
  917. On the 19th of July you wrote:
  918. > As far as I can tell most hash-based WOTS schemes can be reduced to the PRF
  919. property of the hash function.
  920. And on the 15th of July you wrote:
  921. > Can you provide some documentation that IOTA signatures only require that the
  922. function is a OWF (One Way Function) and not a PRF (Pseudo Random Family). This
  923. paper [https://eprint.iacr.org/2011/191.pdf] reduces the Winternitz one-time signature
  924. scheme to the PRF property of a function not onewayness. You can break PRness
  925. without breaking one-wayness.
  926. The first referenced paper states:
  927. > if OWFs exist then EU-CMA signature schemes exist
  928. And you state:
  929. > You can break PRness without breaking one-wayness.
  930. When I combine all this in my head I get the following conclusion: It’s possible to have
  931. an EU-CMA signature scheme using a one-way function which is not pseudo-random. Is
  932. it a correct claim?
  933. PS: Should we review each other’s paper before the publication?
  934. Sergey
  935. Letter #22
  936. Author: Neha Narula
  937. Date: 28th of July
  938. Hi,
  939. Thanks for the updated timeline. Assuming that no one else publishes an attack we are
  940. willing to adhere to your timeline and delay publication until August 12. We are glad to
  941. hear you are replacing curl. I think we’re in agreement, but I’d like to clarify a few
  942. points:
  943. 1. On August 5th, you will need to inform users to upgrade and change
  944. addresses. How do you plan on messaging this? At this point people will start looking
  945. for vulnerabilities.
  946. 2. Related to (1), could you please send us documentation of your signature
  947. scheme? We are a bit concerned about that as well, and once you deploy this fix I’m
  948. sure it will start getting a lot more attention.
  949. We might be a bit slow in responding -- Ethan and Tadge are in a different timezone for
  950. a few days.
  951. Thanks,
  952. Neha
  953. Letter #23
  954. Author: Sergey Ivancheglo
  955. Date: 28th of July
  956. Hi,
  957. > 1. On August 5th, you will need to inform users to upgrade and change addresses.
  958. How do you plan on messaging this? At this point people will start looking for
  959. vulnerabilities.
  960. We are still preparing everything internally. We will give you a headsup on the way this
  961. is going to be communicated.
  962. > 2. Related to (1), could you please send us documentation of your signature scheme?
  963. We are a bit concerned about that as well, and once you deploy this fix I’m sure it will
  964. start getting a lot more attention.
  965. Address generation:
  966. 1. A user supplies a seed
  967. (https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/hash/ISS.java#L18)
  968. 2. A subseed is generated as Curl(seed+N) where N is the index of an address to
  969. generate
  970. (https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/hash/ISS.java#L42)
  971. 3. The subseed is absorbed into Curl and 54 243-trit chunks are squeezed out to get the
  972. private key
  973. (https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/hash/ISS.java#L46)
  974. 4. Each chunk is modified with Chunk=Curl(Chunk) formula 26 times to get the public
  975. key fragment
  976. (https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/hash/ISS.java#L72)
  977. 5. Curl(First27Chunks) is computed to get Digest0, Curl(Remaining27Chunks) is
  978. computed to get Digest1
  979. (https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/hash/ISS.java#L85)
  980. 6. Curl(Digest0 || Digest1) is computed to get the address
  981. (https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/hash/ISS.java#L101)
  982. Bundle hash generation:
  983. A typical bundle consists of 4 transactions going in the following order:
  984. 1. Transaction depositing AAA tokens to Alice
  985. 2. Transaction spending BBB tokens from Bob
  986. 3. Transaction spending 0 tokens from Bob (required for 2-of-2 multisig)
  987. 4. Transaction depositing (BBB-AAA) tokens to Bob
  988. Each transaction has the essence which contains:
  989. 1. 243 trits of the address
  990. 2. 33 trits of the transacted value
  991. 3. 48 trits set to 0 (padding, a single non-zero trit would invalidate the transaction)
  992. 4. 81 trits of the tag
  993. 5. 27 trits of the timestamp
  994. 6. 27 trits of the transaction index in the bundle
  995. 7. 27 trits of the last transaction (in the bundle) index
  996. The bundle hash is computed by absorbing all the essences in the correct order and
  997. squeezing out 243 trits.
  998. Here is an example of such a bundle:
  999. http://iota.tips/search/?kind=transaction&hash=SOKGFAZNVJMEDT9LRODFGSTHDL
  1000. OIJWSFHYHECIE9YQ9NOEAJGFFDOLKCRVGXLXBU9SMIHKEGDCRZ99999
  1001. http://iota.tips/search/?kind=transaction&hash=VETNZBBSTRUNVYVPRRZHCRTLQV
  1002. G9JOOHQIPYHWWAZXZKILIOQXLLKHOIHZCSMGEPA9DG9ZPJYJLN99999
  1003. http://iota.tips/search/?kind=transaction&hash=MFIRBWASZPEZFOKRERDCCVILWIX
  1004. UHSCZFUJ9NKIXFUQLQWMANHLFNOUOJIIORWMYDHIOOCHVGEUZ99999
  1005. http://iota.tips/search/?kind=transaction&hash=DSHH9TNNPJPUYZVRIBLIUTBIWSOF
  1006. KVCAGYSKYWGA9LVCFULRAO9WKJFKMDFRNETDQBYVZOVCRGFS99999
  1007. The raw trytes can be seen by clicking on “Raw trytes (click to show)”
  1008. Signing and verification:
  1009. Those who spend the tokens authorize the spending by signing the bundle hash. IOTA
  1010. signing scheme is based on Winternitz signing scheme where checksum is replaced
  1011. with the following requirement:
  1012. If we assign the following numeric values to the trytes:
  1013. 9 = 0
  1014. A = 1
  1015. B = 2
  1016. ...
  1017. L = 12
  1018. M = 13
  1019. N = -13
  1020. O = -12
  1021. ...
  1022. Y = -2
  1023. Z = -1
  1024. then the sum of the trytes of each 27-tryte bundle hash chunk must be equal to 0. This
  1025. ensures that a change of a single tryte must be compensated by a change of some
  1026. other tryte in the opposite direction thus requiring to break the one-wayness.
  1027. Only 1 of 2^20 bundle hashes satisfies the requirement, this is why the final design
  1028. contains “bundle nonce” field and some PoW must be done by incrementing the field
  1029. value and recomputing the bundle hash. The current design doesn’t require that
  1030. because of a technique added to weaken the signing scheme and disguised as a
  1031. bundle normalization.
  1032. The bundle normalization is done by splitting the bundle hash into 27-tryte chunks and
  1033. incrementing or decrementing the first few trytes until the sum becomes 0
  1034. (https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/hash/ISS.java#L106)
  1035. .
  1036. Each 27-tryte bundle hash chunk is signed with a separate transaction. 2-of-2
  1037. addresses sign only 2 of 3 chunks thus reducing the collision resistance from 243/2 trits
  1038. (~384/2 bits) to 162/2 trits (~256/2 bits).
  1039. Signing and verification is done as in the classical Winternitz scheme where each 243-
  1040. trit fragment of the private key signs a single tryte of the bundle hash thus requiring from
  1041. 0 to 26 Curl invocations. Upon a verification the obtained public key is hashed to get the
  1042. corresponding digests which are then hashed to be compared to the address.
  1043. The hash of the public key fragments (aka digest) is used as a part of a higher level
  1044. protocol protecting against an adversary successfully breaking Curl-P-27 one-wayness.
  1045. Some other techniques are used to reduce the security requirements of IOTA signing
  1046. scheme to one-wayness. All these things are planned to be outlined in a specification
  1047. we are currently writing. Before revealing this to the general public we are still working
  1048. on the final design of IOTA, as such I would appreciate it if you would keep this
  1049. information private and not share it with anyone outside of this group.
  1050. Sergey
  1051. Letter #24
  1052. Author: Sergey Ivancheglo
  1053. Date: 30th of July
  1054. Hi, Ethan
  1055. I'm working on the document addressing your claims.
  1056. On the 19th of July you wrote:
  1057. > 1. Curl's collision and second preimage resistance are broken when used as a hash
  1058. function
  1059. During the verification of your claim that Curl’s second preimage resistance was broken
  1060. I faced a little problem. Your example of a collision containing the lyrics of “Push It To
  1061. The Limit” seems to not satisfy the requirement that (from Wikipedia) “given an input M1
  1062. it should be difficult to find different input M2 such that hash(M1) = hash(M2).”
  1063. While the lyrics might show that M1 was indeed "given" to you,
  1064. “RETHT9ES9HRCUITBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZ
  1065. HFZEHGATZXZAUPGVEKNMQXFVRXHF9QJQHUTILIPIXUYRVSJEIOJDRIUVWMUA
  1066. BSIKIBAKENE9KVFJUEQUHFRVGELFGJIDXQARWH99XTORHXRETHT9ES9HRCUI
  1067. TBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZHFZEHGATZXZAUP
  1068. GVEKNMQXFVR” in front of it ruins the demonstration. A better proof of your claim is
  1069. required, could you, please, provide it by finding M2 for
  1070. “9ABCDEFGHIJKLMNOPQRSTUVWXYZ9ABCDEFGHIJKLMNOPQRSTUVWXYZ9AB
  1071. CDEFGHIJKLMNOPQRSTUVWXYZ” used as M1?
  1072. This is important because googling for “second preimage hash” I
  1073. found https://security.stackexchange.com/questions/69405/difference-between-secondpre-image-resistance-and-collision-resistance-in-crypt/69409
  1074. which among the other
  1075. things states:
  1076. > A second-preimage is also a collision, but we keep the concept distinct because
  1077. second-preimages are supposed to be substantially harder. If the hash function has an
  1078. output of n bits and is "perfect" (no known weakness), then the cost of finding a collision
  1079. is 2^(n/2), while the cost of finding a second-preimage is 2^n (i.e. a lot more).
  1080. and
  1081. > If the attacker sees a valid, signed message m, then he may want to find a message
  1082. m' that hashes to the same value. This is the second-preimage model. For the signature
  1083. system to be robust, the hash function must provide second-preimage resistance.
  1084. Collision resistance, on the other hand, is not necessary in that case.
  1085. and
  1086. > In the case of signatures, you need at least second-preimage resistance; but if the
  1087. context is such that the attacker can obtain signatures on data that he chooses, then
  1088. collision resistance is also needed.
  1089. In IOTA an attacker doesn’t choose the signed message, the chance to guess it
  1090. correctly is negligible.
  1091. Of course, someone might question the validity of the quoted words, but the person who
  1092. answered that Stack Exchange question has the reputation score above 136000.
  1093. Judging by your words, namely:
  1094. > As a participant in the SHA-3 hash function contest who broke one of the 51 Round-1
  1095. SHA-3 proposals and who worked on security proofs for another SHA-3 proposal I can
  1096. say with some authority that using the sponge construction and showing statistical
  1097. properties of the transformation function is not sufficient to ensure security.
  1098. and your references to the opinion of other experts:
  1099. > Ask any cryptographer, they will tell you running custom crypto primitives in
  1100. production is very dangerous and violates basic industry best practices. The number
  1101. one rule of cryptography is "Don't invent your own."
  1102. > http://www.lauradhamilton.com/10-cryptography-mistakes-amateurs-make
  1103. > https://twitter.com/petertoddbtc/status/714447656928415744
  1104. I can safely assume that we can rely on the reputation score as on the measurement of
  1105. the correctness.
  1106. All the above makes me wonder if we can use any excuse for the transition other than
  1107. necessity to use a well-studied and vetted cryptographic primitive.
  1108. PS: If it takes too much time for a successful second preimage attack on Curl-P-27, I
  1109. think, we might go with Curl-P-3 (with only 3 rounds).
  1110. Sergey
  1111. Letter #25
  1112. Author: Ethan Heilman
  1113. Date: 30th of July
  1114. The definition given on crypto.stackexcahnge is an informal and is intended to give
  1115. general gist of what a second preimage attack is. For three formal definitions
  1116. seehttp://web.cs.ucdavis.edu/~rogaway/papers/relates.pdf (page 6).
  1117. For a non-negligible subset of the range, we can find second-preimages. If this breaks
  1118. second-preimage resistance of curl depends on how that is defined and is completely
  1119. unimportant for our attack.
  1120. >In IOTA an attacker doesn’t choose the signed message, the chance to guess it
  1121. correctly is negligible.
  1122. We presented an EU-CMA (Existential Unforgability - Chosen Message Attack) which is
  1123. viewed as a basic security requirement of a signature scheme. As the name would
  1124. imply this is a chosen message attack in which the attacker chooses the message. The
  1125. EU-CMA security of your signature scheme depends on the collision resistance of curl.
  1126. Letter #26
  1127. Author: Sergey Ivancheglo
  1128. Date: 30th of July
  1129. Hi Ethan,
  1130. > For three formal definitions
  1131. see http://web.cs.ucdavis.edu/~rogaway/papers/relates.pdf (page 6).
  1132. Thank you for pointing me to the exact page. There are 3 definitions, could you tell
  1133. which one you used in your claim that the second-preimage resistance was broken?
  1134. This ought to be done to have the same level of formalism.
  1135. > For a non-negligible subset of the range, we can find second-preimages.
  1136. What does make you say that you can find second-preimages for a non-negligible
  1137. subset? From one example it makes sense to assume that you can find collisions only
  1138. for messages beginning with “RETHT9ES9HRCUITBHVCUHOBPUUU”, this would
  1139. explain why “RETHT9ES9HRCUITBHVCUHOBPUUU” is met again in 162 trytes.
  1140. > If this breaks second-preimage resistance of curl depends on how that is defined and
  1141. is completely unimportant for our attack.
  1142. It’s you who already chose the definition, so please provide the definition to let us verify
  1143. the claim. It’s great if you indeed found an easy way to generate collisions, I hope your
  1144. approach can be extended to 3-argument Curl thus helping us to unlock the repudiation
  1145. feature. It’s the only feature which protects end-users
  1146. against https://en.wikipedia.org/wiki/Key_disclosure_law (where the anonymity feature
  1147. fails).
  1148. > We presented an EU-CMA (Existential Unforgability - Chosen Message Attack) which
  1149. is viewed as a basic security requirement of a signature scheme.
  1150. I’m pretty sure it’s only for a spherical signature scheme in vacuum. Quick googling
  1151. returns https://en.wikipedia.org/wiki/Digital_signature_forgery#Existential_forgery_.28exi
  1152. stential_unforgeability.2C_EUF.29 where we can see that “Nevertheless, many state-ofart
  1153. signature algorithms allow existential forgery.” Unless you claim that those words are
  1154. wrong, I think we are in agreement that your phrase should be read as "which is viewed
  1155. as a basic security requirement of SOME signature schemes".
  1156. Sergey
  1157. Letter #27
  1158. Author: Ethan Heilman
  1159. Date: 31st of July
  1160. If you don't find my statements credible then talk to a cryptographer you trust at a
  1161. partner University and ask them if you should use a signature scheme whose EU-CMA
  1162. security is broken.
  1163. Probably best not to use informal stackoverflow answers and Wikipedia for
  1164. understanding the security of your system.
  1165. Letter #28
  1166. Author: Ethan Heilman
  1167. Date: 31st of July
  1168. >Thank you for pointing me to the exact page. There are 3 definitions, could you tell
  1169. which one you used in your claim that the second-preimage resistance was broken?
  1170. This ought to be done to have the same level of formalism.
  1171. In regards to second preimage I am using the first and easiest to satisfy definition. I
  1172. believe that our attacks meet the first definition but I have not made a formal study of
  1173. this yet as I prioritized notifying the IOTA team. In any public report we plan to exactly
  1174. qualify the nature of our attacks. In any event our attack on the EU-CMA security does
  1175. not depend on having second preimage attacks.
  1176. Letter #29
  1177. Author: Ethan Heilman
  1178. Date: 31st of July
  1179. Has the IOTA project assigned a CVE id for this vulnerability?
  1180. Thanks,
  1181. Ethan
  1182. Letter #30
  1183. Author: Sergey Ivancheglo
  1184. Date: 31st of July
  1185. Hi Ethan,
  1186. > If you don't find my statements credible then talk to a cryptographer you trust at a
  1187. partner University and ask them if you should use a signature scheme whose EU-CMA
  1188. security is broken.
  1189. It’s near-impossible to find an expert having experience in application of cryptography to
  1190. real-world use-cases targeted by IOTA. I questioned the credibility of your statements
  1191. because I had spotted few signs of a shallow analysis (which you confirmed in the
  1192. yesterday’s letter by “I have not made a formal study of this yet as I prioritized notifying
  1193. the IOTA team”). Your letters titled “Responsible Disclosure: Cryptographic
  1194. Weaknesses in the Curl hash function in IOTA” sounded pretty official and I thought I
  1195. had to address everything. Now I see that I was wrong, I’m providing 20 statements
  1196. which are still not fully processed, please, inform me which statements (the numbers)
  1197. are still actual, all the others will be considered retracted and won’t be mentioned in the
  1198. document.
  1199. #1: [Jul 15] We have found serious cryptographic weaknesses in the cryptographic hash
  1200. function curl used by IOTA, curl.
  1201. #2: [Jul 15] These weaknesses threaten the security of signatures and PoW in IOTA as
  1202. PoW and Signatures rely on curl to be pseudo-random and collision resistant.
  1203. #3: [Jul 15] (Thus if the first N message blocks are all zeros, then the hash output and
  1204. the state will be all zeros.) This allows the creation of an unlimited number of collisions
  1205. and second-preimages.
  1206. #4: [Jul 15] As message padding is not used in curl, we can construct messages of
  1207. different lengths that result in the same sponge state.
  1208. #5: [Jul 15] The security definitions for hash based signatures assume that the hash
  1209. function is pseudo-random.
  1210. #6: [Jul 15] However curl has non-random properties.
  1211. #7: [Jul 15] Note also the substring 99999 should a occur very infrequently, but we can
  1212. anecdotally observed values of the initial state bleed into the final hash message.
  1213. #8: [Jul 15] Furthermore we have observed clear difference patterns in the hash output
  1214. when each third trit is different between two messages.
  1215. #9: [Jul 15] You can break PRness without breaking one-wayness.
  1216. #10: [Jul 15] Based on the per round diffusion we believe if extend this attack to result in
  1217. a single difference until the 18th round, we will be able to create collisions with high
  1218. probability for random states by ensuring that all differences that exist only occur with
  1219. state[0:243] at the end of a transform. It should work for any number of transform
  1220. invocations greater than 1.
  1221. #11: [Jul 19] Curl's collision and second preimage resistance are broken when used as
  1222. a hash function.
  1223. #12: [Jul 19] IOTA isn't using curl as a hash function but instead using it as a function
  1224. which maps fixed length tryte strings to fixed length tryte strings.
  1225. #13: [Jul 19] Even when used in this setting Curl is not pseudo-random.
  1226. #14: [Jul 19] As far as I can tell most hash-based WOTS schemes can be reduced to
  1227. the PRF property of the hash function.
  1228. #15: [Jul 22] We can now create collisions of messages of the same size.
  1229. #16: [Jul 22] We note these collisions result from the exceptionally poor performance of
  1230. curl’s transform function when attacked by textbook differential cryptanalysis attack.
  1231. #17: [Jul 22] We present the following attack on the EU-CMA security of the signature
  1232. scheme used in IOTA.
  1233. #18: [Jul 23] …your signing scheme EU-CMA forgery depends on the collision
  1234. resistance of curl.
  1235. #19: [Jul 30] For a non-negligible subset of the range, we can find second-preimages.
  1236. #20: [Jul 30] The EU-CMA security of your signature scheme depends on the collision
  1237. resistance of curl.
  1238. > In any event our attack on the EU-CMA security does not depend on having second
  1239. preimage attacks.
  1240. I have a feeling that you refuse to accept existence of cryptographic protocols not
  1241. mentioned in the textbooks read by you. I can imagine an EU-CMA insecure scheme
  1242. which is broken only after second-preimage is broken.
  1243. > Has the IOTA project assigned a CVE id for this vulnerability?
  1244. No. It’s unclear how many vulnerabilities have been found, we may need to use such
  1245. naming convention that would allow grouping of several vulnerabilities. We prefer to
  1246. read the draft of your formal study before assigning the id.
  1247. Sergey
  1248. Letter #31
  1249. Author: David Sønstebø
  1250. Date: 4th of August
  1251. Hey Neha, Ethan and Tadge,
  1252. We are still awaiting a full response to this mail before we can go public. As you know
  1253. we already prepared a migration due to upgrading to Curl 2 for months, but your
  1254. claimed attack accelerated our priorities, but your sudden reluctance/absence in
  1255. verifying the claims make us a bit weary. We have prepared everything and are
  1256. currently writing up our update/migration blog post/newsletter to the community, but
  1257. beyond what we have already communicated for months we were expecting a thorough
  1258. breakdown of Curl, which has not happened yet...
  1259. We are already teamed up with world leading sponge construction hash function
  1260. experts who are awaiting Ethan's discovery, but for almost a week now there has been
  1261. no communication...
  1262. Before the next phase we need Ethan to respond to all of Sergey/CfBs concerns, so
  1263. that we can publicly display the concerns in a fully transparent manner.
  1264. Letter #32
  1265. Author: Ethan Heilman
  1266. Date: 5th of August
  1267. >We have prepared everything and are currently writing up our update/migration blog
  1268. post/newsletter to the community
  1269. On what day are you planning on publishing this information?
  1270. >Before the next phase we need Ethan to respond to all of Sergey/CfBs concerns, so
  1271. that we can publicly display the concerns in a fully transparent manner.
  1272. Sergey's long list questions didn’t seem to serve much of a purpose but I’m happy to
  1273. summarize our findings.
  1274. We showed practical examples for the following:
  1275. (1). If curl is used as a cryptographic hash function, two methods for finding trivial
  1276. collisions exist: (a). Collisions which exploit the failure to apply message padding and
  1277. (b). Collisions which exploit the fact that an all zero message is a fixed point in curl
  1278. enabling multi-collisions between messages of different lengths.
  1279. (2). Curl is non-pseudorandom, as certain inputs which are related by a bit-rotation
  1280. results in outputs which are related by a bit-rotation. This does not exploit the
  1281. weaknesses in (1), but relies on additional weaknesses in the curl function design.
  1282. (3). Curl’s s-box is vulnerable to differential cryptanalysis, using this vulnerability we can
  1283. create full-state collisions in messages of the same size. These collisions do not exploit
  1284. the weakness in message padding or the all zero-fixed point. This does not exploit the
  1285. weaknesses in (1) or (2), but relies on additional weaknesses in the curl function design
  1286. namely weak per round diffusion and bad s-box design.
  1287. Based on a understanding of the IOTA signature scheme from reading of the code and
  1288. conversations via email we also have the following attack:
  1289. (4). IOTA uses a signature scheme which hashes messages and then applies WOT-Slike
  1290. operations on these hashes. Using (3) we can break the EU-CMA security of this
  1291. signature scheme.
  1292. >We are already teamed up with world leading sponge construction hash function
  1293. experts who are awaiting Ethan's discovery, but for almost a week now there has been
  1294. no communication…
  1295. We have provided practical collisions on messages of the same length which we sent to
  1296. you some time ago and showed how this breaks EU-CMA security of IOTA WOT-S-like
  1297. signature scheme. What discovery are you waiting on?
  1298. Which cryptographers have you been talking to? Can you put us in touch with them?
  1299. Letter #33
  1300. Author: Sergey Ivancheglo
  1301. Date: 5th of August
  1302. Hi Ethan,
  1303. > On what day are you planning on publishing this information?
  1304. David or Dominik will inform you about this in another letter.
  1305. > Sergey's long list questions didn’t seem to serve much of a purpose
  1306. The purpose was to get which statements were still actual. You listed none, so I take it
  1307. as all of them being retracted.
  1308. > (1). If curl is used as a cryptographic hash function, two methods for finding trivial
  1309. collisions exist: (a). Collisions which exploit the failure to apply message padding and
  1310. (b). Collisions which exploit the fact that an all zero message is a fixed point in curl
  1311. enabling multi-collisions between messages of different lengths.
  1312. The both are caused by an incorrect usage of Curl (the length should be absorbed first).
  1313. > (2). Curl is non-pseudorandom, as certain inputs which are related by a bit-rotation
  1314. results in outputs which are related by a bit-rotation. This does not exploit the
  1315. weaknesses in (1), but relies on additional weaknesses in the curl function design.
  1316. This is caused by an incorrect usage of Curl (the length should be absorbed first).
  1317. > (3). Curl’s s-box is vulnerable to differential cryptanalysis, using this vulnerability we
  1318. can create full-state collisions in messages of the same size. These collisions do not
  1319. exploit the weakness in message padding or the all zero-fixed point. This does not
  1320. exploit the weaknesses in (1) or (2), but relies on additional weaknesses in the curl
  1321. function design namely weak per round diffusion and bad s-box design.
  1322. This is a design choice (fine-graininess). 15 rounds of Curl-P have diffusion and S-box
  1323. non-linearity equivalent to 3 rounds of Keccak. Unlike Keccak, Curl-P uses identical
  1324. algebraic representations for all trit transitions to make all attacks as simple as possible
  1325. thus making finding the min number of rounds for a required security level trivial. Curl-P
  1326. state size being only 72% of Keccak state size makes all analyses even simpler. (Not
  1327. sure this information is really necessary, you should have noticed all this already, I
  1328. provide it in case if you just fed a binary version of Curl into existing cryptanalytical
  1329. software.)
  1330. > (4). IOTA uses a signature scheme which hashes messages and then applies WOTS-like
  1331. operations on these hashes. Using (3) we can break the EU-CMA security of this
  1332. signature scheme.
  1333. We would like to see a proof of this claim to make sure that you took the higher level
  1334. protocol into account.
  1335. > We have provided practical collisions on messages of the same length which we sent
  1336. to you some time ago and showed how this breaks EU-CMA security of IOTA WOT-Slike
  1337. signature scheme. What discovery are you waiting on?
  1338. The provided collisions didn’t break EU-CMA security, we are waiting for an algorithm
  1339. which indeed allows to break that.
  1340. > Which cryptographers have you been talking to? Can you put us in touch with them?
  1341. You haven't supplied us with the details we requested so therefore they are very
  1342. confused as well because your finding was a single internal collision while you were
  1343. mistakenly claiming that it broke second-preimage resistance of Curl-P-27. Your
  1344. summary of the findings shows that you finally saw that too. We hesitate to inform them
  1345. about your claim of breaking EU-CMA security of IOTA signatures because we haven’t
  1346. seen your proof yet and are pretty sure that you are wrong again. Could we see the
  1347. draft of the paper you are planning to publish?
  1348. Sergey
  1349. Letter #34
  1350. Author: Ethan Heilman
  1351. Date: 5ht of August
  1352. Hi Sergey
  1353. >The purpose was to get which statements were still actual. You listed none, so I take it
  1354. as all of them being retracted.
  1355. We have not retracted any statements. We provided a summary of our results which we
  1356. continue to stand by. We excluded second-preimage attacks from the summary since
  1357. although we believe we have broken the second-preimage resistance of curl we have
  1358. not formally quantified the second-preimage attack.
  1359. >We hesitate to inform them about your claim of breaking EU-CMA security of IOTA
  1360. signatures because we haven’t seen your proof yet and are pretty sure that you are
  1361. wrong again.
  1362. Why not let them judge for themselves? We have provided detailed description of our
  1363. attack such that any serious-cryptographer could tell if we have broken the EU-CMA
  1364. security of IOTA's signature scheme.
  1365. Who are they? How does this agree with your earlier statement that
  1366. >It’s near-impossible to find an expert having experience in application of cryptography
  1367. to real-world use-cases targeted by IOTA
  1368. In regards to breaking the EU-CMA security of IOTA:
  1369. As you said in an earlier email "Signing and verification is done as in the classical
  1370. Winternitz scheme where each 243-trit fragment of the private key signs a single tryte of
  1371. the bundle hash thus requiring from 0 to 26 Curl invocations."
  1372. This agrees with what we have seen in the code. As a result a collision in messages of
  1373. the same length breaks EU-CMA security of the signing scheme since unlike WOT-S
  1374. the EU-CMA security of the IOTA signing scheme depends on collision resistance of the
  1375. hash function.
  1376. Can you provide some details on the proof you are waiting for?
  1377. Thanks,
  1378. Ethan
  1379. Letter #35
  1380. Author: Sergey Ivancheglo
  1381. Date: 5th of August
  1382. Hi,
  1383. > We have not retracted any statements.
  1384. Here is a list I’m currently working on, is anything missing?
  1385. S01: We have found serious cryptographic weaknesses in the cryptographic hash
  1386. function curl used by IOTA, curl.
  1387. Only a single internal collision was demonstrated for a weakened version of Curl-P. It
  1388. was expectable, especially after a collision on a Keccak equivalent was found
  1389. (http://keccak.noekeon.org/crunchy_mails/coll-r6-w1600-20170226.txt).
  1390. S02: These weaknesses threaten the security of signatures and PoW in IOTA as PoW
  1391. and Signatures rely on curl to be pseudo-random and collision resistant.
  1392. Awaiting a proof.
  1393. S03: This allows the creation of an unlimited number of collisions and secondpreimages.
  1394. Incorrect usage of Curl.
  1395. S04: Since the state is the same regardless of the number of prefixed zero input blocks
  1396. we can create more complex collisions and second-preimages.
  1397. Incorrect usage of Curl.
  1398. S05: As message padding is not used in curl, we can construct messages of different
  1399. lengths that result in the same sponge state.
  1400. Incorrect usage of Curl.
  1401. S06: We have also found another form of non-randomness. Namely two similar
  1402. messages result in states that are different only by a positional shift.
  1403. Incorrect usage of Curl.
  1404. S07: Note also the substring 99999 should a occur very infrequently, but we can
  1405. anecdotally observed values of the initial state bleed into the final hash message.
  1406. The same can be observed for SHA-256:
  1407. SHA256(*999999*2d224a9a45e7c8eb185971e53574024801252322d93550f4f5987add
  1408. f8) = 567be78f9537b18990e32b6164fe06*999999*19b50c7a23556cc6aeb85dbe4778
  1409. SHA256(*999999*16e09f623d0cc86cf5eba24e9e1d14f86f12a6a1ea46a4fc984b46c85d
  1410. ) = 699ec27b2b9e4a800841bccd6a4bdd*999999*2a03cceefa6b014dc3d2edd35f60
  1411. SHA256(*999999*74d828d6d9d420acd5f1fcf44bff94b45cb6a3fe539fb20e245cbcdcea)
  1412. = 6b16590e1583885741dbd77bb4d3dd*999999*33d03cb2c20d13ac7cf134e9da76
  1413. S08: Furthermore we have observed clear difference patterns in the hash output when
  1414. each third trit is different between two messages.
  1415. An example wasn’t provided.
  1416. S09: This paper [https://eprint.iacr.org/2011/191.pdf] reduces the Winternitz one-time
  1417. signature scheme to the PRF property of a function not onewayness.
  1418. The abstract states: “We show that the Winternitz one-time signature scheme is
  1419. existentially unforgeable under adaptive chosen message attacks when instantiated
  1420. with a family of pseudo random functions. Compared to previous results, which require
  1421. a collision resistant hash function, our result provides significantly smaller signatures at
  1422. the same security level.” Which shows that we can reduce WOTS to different properties.
  1423. One can reduce WOTS to one-wayness by using the technique
  1424. from https://pdfs.semanticscholar.org/aaf3/602cdcd40276d2239f22f2eeaf5c2d45446f.p
  1425. df.
  1426. S10: [W]e will be able to create collisions with high probability for random states by
  1427. ensuring that all differences that exist only occur with state[0:243] at the end of a
  1428. transform. It should work for any number of transform invocations greater than 1.
  1429. Awaiting for an example of such collision.
  1430. S11: Curl's collision and second preimage resistance are broken when used as a hash
  1431. function.
  1432. A single internal collision for a weakened version was demonstrated. No secondpreimage
  1433. attack was demonstrated.
  1434. S12: IOTA isn't using curl as a hash function but instead using it as a function which
  1435. maps fixed length tryte strings to fixed length tryte strings.
  1436. According to Wikipedia “A hash function is any function that can be used to map data of
  1437. arbitrary size to data of fixed size”. Unclear if the difference between “arbitrary size” and
  1438. “fixed length” is really significant. Confused what this statement could mean.
  1439. S13: Even when used in this setting Curl is not pseudo-random.
  1440. Awaiting a proof with correct usages of Curl.
  1441. S14: It is unclear if this breaks the signature scheme used by IOTA because the
  1442. signature scheme used by IOTA is not well documented and does not have security
  1443. arguments.
  1444. Some information was provided, no requests for more information were received.
  1445. S15: As far as I can tell most hash-based WOTS schemes can be reduced to the PRF
  1446. property of the hash function.
  1447. See S09.
  1448. S16: We can't attack the signature scheme until we understand it, and understanding a
  1449. signature scheme from source code alone is a time intensive process.
  1450. An attack was provided later which implies that the signature scheme had been
  1451. understood. Should, probably, be grouped together with S14.
  1452. S17. This appears to break the standard definition of security for signature schemes
  1453. called EU-CMA (Existential Unforgeability under a Chosen Message Attack)
  1454. [http://www.cs.tau.ac.il/~canetti/f08-materials/scribe8.pdf].
  1455. Awaiting for a proof.
  1456. S18: We note these collisions result from the exceptionally poor performance of curl’s
  1457. transform function when attacked by textbook differential cryptanalysis attack.
  1458. This is a design choice because making attacks simple allows to pick the min number of
  1459. rounds for a required security level without worrying that the attacks will become more
  1460. complex in the future (the evolution of slide attacks is a good example of how this
  1461. happens).
  1462. S19: We base this on the following description of the signature scheme used in IOTA.
  1463. The described attack can’t be applied to IOTA because it doesn’t take into account
  1464. higher level protocols.
  1465. S20: We used the lyrics to the 80’s hit single “push it to the limit” in the colliding
  1466. messages to demonstrate that we fully collide the internal state of curl and thus have
  1467. arbitrary control over most of the message. We note that this internal state collision
  1468. enables us to instantly create millions of other colliding messages.
  1469. These “millions of other colliding messages” cover less than 3^(-333) part of all possible
  1470. messages hence they can appear with negligible probability even if we generate
  1471. transactions with 1 billion TPS during 1 billion years.
  1472. S21: Can you explain your signature scheme then? When generating a signature do
  1473. you or do you not hash the message? We have looked in multiple implementations and
  1474. it appears that you do. If you do then our attack holds and your signing scheme EUCMA
  1475. forgery depends on the collision resistance of curl.
  1476. It also depends on higher level protocols, as I have already described in previous
  1477. correspondence and will elaborate on in the next points.
  1478. S22: These attacks we have developed will always get better. The current results are
  1479. from roughly 20 hours of work.
  1480. Satoshi’s invention led to a paradigm shift in a lot of areas. Unfortunately, some
  1481. cryptographers still didn’t fully embrace that and keep sticking to obsolete security
  1482. assumptions. In our very case it means that window for an attack is very small
  1483. (maximum - until a transaction is confirmed).
  1484. S23: For a non-negligible subset of the range, we can find second-preimages.
  1485. You use an unorthodox definition of “non-negligible” because odds to select a message
  1486. which can be second-preimage attacked are below 1 of
  1487. 8718964248596095820291107058586077169696407240473175008552521943799096
  1488. 7093723439943475549906831683116791055225665627 for a single attempt. (Here I
  1489. assume that you are planning to use a method based on an internal collision.)
  1490. S24: If this breaks second-preimage resistance of curl depends on how that is defined
  1491. and is completely unimportant for our attack.
  1492. All the provided definitions show that second-preimage resistance of Curl hasn’t been
  1493. broken. Awaiting for more definitions to check.
  1494. S25: The EU-CMA security of your signature scheme depends on the collision
  1495. resistance of curl.
  1496. Awaiting the description of a reduction of higher level protocols to collision resistance of
  1497. Curl.
  1498. S26: In any event our attack on the EU-CMA security does not depend on having
  1499. second preimage attacks.
  1500. Awaiting the description of the attack.
  1501. > We excluded second-preimage attacks from the summary since although we believe
  1502. we have broken the second-preimage resistance of curl we have not formally quantified
  1503. the second-preimage attack.
  1504. Looking forward to seeing these attacks. If you are unable to break second-preimage
  1505. resistance for even 27 rounds then this will mean that the versions with a larger number
  1506. of rounds are safe for sure, we'll need to reduce the number to 15+ rounds then.
  1507. > Why not let them judge for themselves?
  1508. Their time is expensive so we have to do some basic filtering.
  1509. > We have provided detailed description of our attack such that any seriouscryptographer
  1510. could tell if we have broken the EU-CMA security of IOTA's signature
  1511. scheme.
  1512. What you have provided is not applicable to IOTA’s signature scheme because you
  1513. ignored higher level protocols.
  1514. > Who are they?
  1515. As you may know, official cooperation requires weeks of paperwork, I think you
  1516. understand why we can’t reveal their names now.
  1517. > How does this agree with your earlier statement that
  1518. Well, I would answer honestly but this may be considered as a personal insult, so
  1519. before that I’d like to get the absolution from you in advance.
  1520. > As a result a collision in messages of the same length breaks EU-CMA security of the
  1521. signing scheme since unlike WOT-S the EU-CMA security of the IOTA signing scheme
  1522. depends on collision resistance of the hash function.
  1523. It seems to me you didn’t receive my letter to Neha, here is the essential part:
  1524. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/TransactionValidator.j
  1525. ava#L72
  1526. Here the collision would invalidate a transaction if it adjusted “timestamp” to an invalid
  1527. value.
  1528. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/TransactionValidator.j
  1529. ava#L77
  1530. Here the collision would invalidate a transaction if it adjusted “value” to an invalid value.
  1531. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/BundleValidator.java#
  1532. L35
  1533. Here the collision would invalidate a bundle if it broke “currentIndex” sequence or
  1534. “lastIndex” didn’t match the real number of the transactions in the bundle.
  1535. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/BundleValidator.java#
  1536. L43
  1537. Here the collision would invalidate the bundle if it changed the transferred value.
  1538. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/BundleValidator.java#
  1539. L73
  1540. Here the collision would invalidate the bundle if it changed “address” field of a multi-sig
  1541. address (there are no single-sig addresses in official wallet, all addresses are 2-of-2
  1542. ones, but custom software might generate single-sig addresses).
  1543. https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/BundleValidator.java#
  1544. L79
  1545. Here the collision would invalidate the bundle if it changed the spending address.
  1546. I don’t have the source code of the Coordinator on this notebook, the code is not public,
  1547. but I can get it tomorrow if it’s important. The Coordinator is used as an extra protection
  1548. measure. Particularly, it stores all transactions that reach it, this allows us to recover
  1549. iotas sent to addresses with typo (we detect it because users usually publish the
  1550. addresses on the tangle before usage), during the latest snapshot we used the
  1551. Coordinator to restore iotas sent to addresses generated with the previous (now
  1552. obsolete) address generation scheme.
  1553. > Can you provide some details on the proof you are waiting for?
  1554. We’d like to see how you avoid generation of collisions which wouldn’t pass the
  1555. verifications above. Also we’d like to know if the collisions can be generated in real-time
  1556. to win the propagation race against legitimate transactions.
  1557. Sergey
  1558. Letter #36
  1559. Author: Ethan Heilman
  1560. Date: 5th of August
  1561. >It seems to me you didn’t receive my letter to Neha, here is the essential part:
  1562. EU-CMA security does not require that the messages pass validation checks outside of
  1563. the signature scheme.
  1564. >As you may know, official cooperation requires weeks of paperwork, I think you
  1565. understand why we can’t reveal their names now.
  1566. I have never heard of any paper work being required to talk to a cryptographer, nor
  1567. have I heard of any cryptographers requesting that their names be withheld to answer
  1568. basic cryptography questions. It is very unusual.
  1569. This is not intended as an insult but the list of questions asked here show a lack of
  1570. understanding of the basics of how cryptographic primitives and schemes are assessed.
  1571. As you don't seem to believe me on such issues I would ask that you reach out to a
  1572. cryptographer, if one isn't available I would be willing to put you in touch with one to give
  1573. you a second opinion.
  1574. Letter #37
  1575. Author: David Sønstebø
  1576. Date: 5th of August
  1577. Hey Ethan,
  1578. Regarding the issue of cryptographers, like we mentioned weeks ago, we have been
  1579. working on finalizing Curl 2 with leading cryptographers with special expertise in the
  1580. realm of sponge family for a long time. This is simply a formality. They represent a
  1581. company, not an academic institution, so we want to clear it with them beforehand
  1582. before releasing their affiliation, which I hope you can understand. Beyond this, those
  1583. details we have requested is something they really want also to be able to make a
  1584. thorough review of your claims.
  1585. We asked you a week or so ago to disclose who these other cryptographers you had
  1586. discussed this with was, you never replied to that, but now that you are offering to do so
  1587. for a second opinion, I would absolutely welcome that.
  1588. I propose you put us in touch with those right away, then I'll get the paperwork sorted
  1589. with the team we are working with by Monday or Tuesday and then you can also talk
  1590. with them.
  1591. All the best,
  1592. David
  1593. Letter #38
  1594. Author: Sergey Ivancheglo
  1595. Date: 5th of August
  1596. Hi, Ethan
  1597. > EU-CMA security does not require that the messages pass validation checks outside
  1598. of the signature scheme.
  1599. You mean “…outside of a spherical signature scheme in vacuum”, don’t you? In our
  1600. letters we are discussing a concrete signature scheme used in IOTA.
  1601. > This is not intended as an insult but the list of questions asked here show a lack of
  1602. understanding of the basics of how cryptographic primitives and schemes are assessed.
  1603. I can explain why these questions were asked, just need the absolution from you (in
  1604. case if you are offended by my words, lack of English vocabulary makes me sound
  1605. pretty blunt). Could I have it?
  1606. > As you don't seem to believe me on such issues…
  1607. We have taken these issues very seriously from day one, recall that we contacted you,
  1608. among a lot of other people in the space, to review Curl several months ago. On top of
  1609. this we are taking concrete action, but when it comes to these claims we want to stick to
  1610. the Popperian principles of empirical verification rather than rely on belief, which belong
  1611. in the realm of religion. Again this should simply be interpreted as us taking this very
  1612. seriously and not wanting to let the devil hide in the details.
  1613. Sergey
  1614. Letter #39
  1615. Author: Neha Narula
  1616. Date: 5th of August
  1617. You have no such absolution if your response takes us beyond the level of professional
  1618. and civil discourse. If anyone personally insults a member of my team, we will have to
  1619. cease communication.
  1620. Letter #40
  1621. Author: Sergey Ivancheglo
  1622. Date: 5th of August
  1623. Hi Neha,
  1624. don't worry. From our side this is only about facts and making sure we understand each
  1625. other properly. By "absolution" I am simply attempting to ensure that we indeed stick to
  1626. the civil discourse, like I mentioned English is my third language, and I was getting
  1627. worried that my blunt wording might come off as offensive. I believe this entire chain of
  1628. letters make it evident that we are focused on a civil professional relation.
  1629. PS: I even unsure that putting "Hi, <name>" everywhere is suitable, I wish I took normal
  1630. English classes instead of learning it by reading Java documentation )
  1631. Sergey
  1632. Letter #41
  1633. Author: Sergey Ivancheglo
  1634. Date: 6th of August
  1635. Hi Ethan,
  1636. This morning I read an interesting blog post
  1637. - https://medium.com/@avivzohar/responsible-disclosure-in-cryptocurrencies74833fc4f211.
  1638. Unfortunately, it ended abruptly, the author admitted that he didn’t know
  1639. answers for the questions he had raised. But the post triggered something in my brain
  1640. and the latter produced one scheme...
  1641. “I hope that we find clear and ethical practices that promote more secure and stable
  1642. systems” - these were the very last words from that blog post. I know what should be
  1643. added into the box with these practices, it’s FORMALIZATION. Several letters back you
  1644. and me were arguing if your findings can break the second-preimage resistance, the
  1645. issue was solved after you provided those three formal definitions. I suggest to apply
  1646. this method to your claim regarding EU-CMA of IOTA signature scheme.
  1647. You gave me this link - http://www.cs.tau.ac.il/~canetti/f08-materials/scribe8.pdf. On
  1648. page 2 we can see a formal EU-CMA definition (not sure what steps 1-6 you chose for
  1649. your proof to make sense because IOTA uses WOTS but I assume that step 7 is
  1650. preserved):
  1651. 7. Adversary wins if Ver(vk, m*, s*) = accept and m* wasn't previously signed by Sign
  1652. This is a step where your attack fails because of the higher level protocols. Particularly,
  1653. the failure happens in some of those lines of the code that I sent to Neha and later resent
  1654. to you. I’m pretty sure that if I manage to formalize the higher level protocols then
  1655. we’ll come to a consensus on this matter. I think the consensus is even inevitable. I’d
  1656. like to know the date when you finalize your publication text, I’ll do my best to have the
  1657. formalization ready a few days earlier so we could get it included into your paper. There
  1658. are approximately 5 days left, right?
  1659. PS: Aviv’s blog post is really important to the industry of cryptoplatforms, what do you
  1660. think of the idea to co-author the Postmortem of your responsible disclosure as a
  1661. continuation of Aviv’s post? We might include several quotes from our letter exchange
  1662. to let the readers get real feeling of how all this happens.
  1663. Sergey
  1664. Letter #42
  1665. Author: David Sønstebø
  1666. Date: 7th of August
  1667. Hello Neha,
  1668. We have slightly moved up the timeline on our side to accommodate some of the
  1669. entities in the ecosystem that rely on IOTA, which weren't able to participate in this
  1670. discussion until now. The newly proposed timeline is as follows:
  1671. 1) Tonight we will be announcing a new snapshot with the transition from Curl to Keccak
  1672. 2) Tomorrow (8th of August) we will be doing a snapshot, requesting everyone to move
  1673. their iotas. The wallets and the core clients are already ready and have been tested by
  1674. the team & people from the community in the last week.
  1675. 3) August 16th we will be doing a second snapshot as a security precaution.
  1676. In order to ensure that everyone involved comes out of this in a positive manner, we
  1677. would like to review Ethan's paper before the official publication. It has become quite
  1678. obvious that Ethan doesn't trust our team's expertise, but he demonstrated integrity by
  1679. contacting us despite of working on a competing project (Paragon), and we feel
  1680. obligated to protect his renome which may be harmed if he publishes a paper with
  1681. incorrect information resulting from sheer misunderstandings. Judging by the letter
  1682. exchange we are sure that he indeed got some aspects of IOTA's security wrong, which
  1683. again reiterates the importance of him providing the details we have requested for 2
  1684. weeks now. Then we can finally file this into the academic annals.
  1685. All the best,
  1686. David
  1687. Letter #43
  1688. Author: Neha Narula
  1689. Date: 7th of August
  1690. Hi David,
  1691. Thanks for the timeline update. There are more responses forthcoming to the other
  1692. emails.
  1693. How are you planning on describing the reason for the transition in your messaging to
  1694. users?
  1695. Thanks,
  1696. Neha
  1697. Letter #44
  1698. Author: Neha Narula
  1699. Date: 7th of August
  1700. Ethan has nothing to do with Paragon the network/cryptocurrency. Ethan is associated
  1701. with a completely different organization known as the Paragon Foundation. I think his
  1702. renown will be fine.
  1703. Letter #45
  1704. Author: David Sønstebø
  1705. Date: 7
  1706. th of August
  1707. Hello Neha,
  1708. Looking forward to the replies to the other mails, they should be elucidating the issue for
  1709. us.
  1710. We will describe it as is. IOTA is a non-profit foundation that is all about transparency of
  1711. process.
  1712. Re: Ethan and Paragon, I of course meant his role in the Paragon Foundation. We even
  1713. have admission from Ethan that he is working on a 'similar project' from back in May
  1714. when we asked him to audit Curl, where he adviced that we not disclose information
  1715. that wasn't known, precisely due to the potential conflict he himself highlighted. This is
  1716. a very sensitive matter, so I'd prefer we stear clear of assumptions.
  1717. Letter #46
  1718. Author: Neha Narula
  1719. Date: 7th of August
  1720. Great. Could you share how you will "describe it as it is"? What will you say is the
  1721. reason for the transition?
  1722. Letter #47
  1723. Author: David Sønstebø
  1724. Date: 7th of August
  1725. Hey,
  1726. It will be quite straight forward, this is just another basic update in an evolving cutting
  1727. edge project, nothing special, particularly because we need to see Ethan's paper and
  1728. his answers to the details we have requested. If all he found was one of the anti-scamcopycat
  1729. mechanisms then it's nothing extraordinary, another one of the security auditers
  1730. we contacted around the same time as Ethan found another one too. This is to be
  1731. expected from all new projects in their beta to maturation stage.
  1732. We have disclosed Curl's current state numerous times, like here in IOTA's
  1733. Transparency Compendium and already considered using SHA-3 in the intermediary
  1734. period since inception, we even discussed Curl and SHA-3 with the Keccak team since
  1735. early 2015, so this is not some big thing for us, it's just a basic update to be on the extra
  1736. safe side. Since it pertains to security it is something to always be taken very seriously,
  1737. but it's not really some major finding, even if Ethan were to demonstrate an attack
  1738. vector (which he so far has been unable to do).
  1739. We will also mention that we contacted this cryptographer (Ethan) back in May, but that
  1740. he then declined due to working on a competing project, just for full transparency and
  1741. disclosure. Accuracy and facts is extremely important to us, as should be abundantly
  1742. clear by now.
  1743. In addition it is accompanied with other planned upgrades to the protocol, so the timing
  1744. is great to just combine it.
  1745. Best,
  1746. David
  1747. Letter #48
  1748. Author: David Sønstebø
  1749. Date: 7th of August
  1750. Hey, quick question: since it's approaching 8 PM here in Europe I want to know whether
  1751. we should name the 3 of you already now, or wait with that until we have discussed the
  1752. details, received responses from Ethan and agree on the publication? I could refer to
  1753. you as "the party that contacted us for responsible disclosure" for now if you wish.
  1754. Best,
  1755. David
  1756. Letter #49
  1757. Author: Neha Narula
  1758. Date: 7th of August
  1759. I'm a little unclear on how you plan on discussing us, so it's difficult for me to answer
  1760. this question. Could you please share the section which references us, if not the whole
  1761. post?
  1762. Letter #50
  1763. Author: David Sønstebø
  1764. Date: 7th of August
  1765. This is the relevant section:
  1766. One of the cryptographers we reached out to months ago to review Curl has disclosed
  1767. that he is worried there might be a potential vulnerability in Curl. We have since had our
  1768. internal team, as well as other cryptographers review it and asked the disclosing party
  1769. for more information. While the party that did the responsible disclosure has been quite
  1770. forthcoming, there are still some of the last details to be discussed more thoroughly with
  1771. the respective teams in order to reproduce the claims and verify if there was even any
  1772. vulnerability.
  1773. However, even though we have protection mechanisms in place that would render even
  1774. most valid attacks useless in this ‘training wheel stage’ (due to the Coordinator and the
  1775. higher-level protocol), as you are working on the cutting edge you have to take every
  1776. precaution possible and always be on guard. Therefore we have made the simple
  1777. decision to temporarily switch Curl with Keccak (SHA-3) for cryptographic signing in
  1778. IOTA. This is something we had contemplated previously as well, and is now put in
  1779. motion. Our stellar developers have been tremendous at executing this in a secure and
  1780. expedient manner. More details on the technical changes will follow in a document
  1781. tomorrow.
  1782. The party that contacted us will be releasing a publication of these potential results after
  1783. we together nail down the details. We are thrilled about the upcoming publication as it
  1784. will potentially provide deeper insight into Curl itself. Curl’s origins date back over 2
  1785. years, since then we have engaged numerous cryptographers, in particular experts in
  1786. the domain of sponge family hash functions, which Keccak and Curl both belong in, in
  1787. order to further optimize and audit the final incarnation of Curl. We are very excited
  1788. about this aspect of IOTA. Curl is a hash function specifically tailored for IoT, that also
  1789. happens to be the world’s first trinary one, so we spare no expense on this part of the
  1790. project, as we deem it necessary for IOTA and IoT in general to realize its full potential.
  1791. Letter #51
  1792. Author: Neha Narula
  1793. Date: 7th of August
  1794. Thank you for sharing, David, this is really helpful.
  1795. At the moment, I think we're fine with not being mentioned by name in your post.
  1796. We'll make sure to also mention how quickly you got the new software release
  1797. completed.
  1798. Our document is not done yet; we're still working on it.
  1799. Letter #52
  1800. Author: David Sønstebø
  1801. Date: 7th of August
  1802. Great to hear Neha. I respect your decision. Here is the full blog post
  1803. https://blog.iota.org/upgrades-updates-d12145e381eb
  1804. Looking forward to it, thanks.
  1805. Best,
  1806. David
  1807. Letter #53
  1808. Author: Neha Narula
  1809. Date: 8th of August
  1810. Hi IOTA team,
  1811. Here are two bundles which differ in one trit (Address[72] of the last transaction) which
  1812. hash to the same value, and thus have the same signature. Both bundles pass your
  1813. bundle.IsValid() checks in the go library.
  1814. I'd like to confirm with you the following:
  1815. 1) The bundles do hash to the same value
  1816. 2) The bundles are well formed according to your application validity checks (the "higher
  1817. level protocols"). I have not tested this with your Java library.
  1818. We were able to produce these conflicting bundles in a few minutes.
  1819. Best,
  1820. Neha
  1821. var BUNDLE0 []giota.Trytes = []giota.Trytes{
  1822. "999…<snip>…BKE",
  1823. "T9E…<snip>…ROK",
  1824. "AZZ…<snip>…TCO",
  1825. "999…<snip>…CQR",
  1826. }
  1827. var BUNDLE1 []giota.Trytes = []giota.Trytes{
  1828. "999…<snip>…BKE",
  1829. "T9E…<snip>…ROK",
  1830. "AZZ…<snip>…TCO",
  1831. "999…<snip>…CQR",
  1832. }
  1833. Letter #54
  1834. Author: Sergey Ivancheglo
  1835. Date: 8th of August
  1836. Hi Neha,
  1837. We can’t get your bundles to be validated successfully. It’s unclear if it’s a bug in the
  1838. unfinished Go version or something else, we can’t check it right now because of the
  1839. preparations to the snapshot. The bundles fail in Java version because they don’t form
  1840. the correct chain of the transactions. The chain starts from the transaction with current
  1841. index = 0, the trunk transaction should be set to the hash of the following transaction
  1842. (with current index = 1) and so on. In other words the chain of trunk transaction
  1843. references must go from the first to the last transaction. The trunk transaction of the
  1844. very last transaction must reference any transaction with current index = 0, “999…999”
  1845. is a safe choice. Branch transactions must reference any transactions with current index
  1846. = 0 too.
  1847. Some other issue we noticed: Only one of the bundles can be confirmed (because they
  1848. share some transactions) but redoing PoW would allow to confirm the both if there was
  1849. enough money on the spending address balance. In any case the original variant
  1850. doesn’t allow to trigger a network consensus divergence because of Coordinator.
  1851. > 1) The bundles do hash to the same value
  1852. Yes.
  1853. > 2) The bundles are well formed according to your application validity checks (the
  1854. "higher level protocols").
  1855. No. The chain of references should be fixed, it’s easy.
  1856. > We were able to produce these conflicting bundles in a few minutes.
  1857. What are the mean and the variance of this process? A single number is not very
  1858. helpful to assess probability of finding conflicting bundles while the window for an attack
  1859. is open.
  1860. Sergey
  1861. Letter #55
  1862. Author: Neha Narula
  1863. Date: 8th of August
  1864. Might I trouble you to check these two bundles? They should have valid trunk
  1865. transactions and valid PoW. I will try to get the java code running as it seems to do
  1866. more checks.
  1867. Could you recommend a server for a tangle that we could connect to?
  1868. Letter #56
  1869. Author: Sergey Ivancheglo
  1870. Date: 9th of August
  1871. Maybe it's because of deep night here but I see strange things:
  1872. 1. The both transaction sets seem to be identical
  1873. 2. The declared bundle hash
  1874. is PMII9EP9GYVEEOHAYKW9N9WWHABYMK9IDOMEK9LTHNOJAEKACUDEQA9H
  1875. RXRVNVRSZAWC9HOW9GNMLGXUK while the actual bundle hash
  1876. is LAFLFDFYMSWKWHBEXYHQ9AFJATGGXR9MKF9ZXHGMZ9TSJJTFHZAAHLNS
  1877. WBEJFYBADYPHQCCIAUSJQJDME
  1878. 3. The trunk transaction fields reference transactions generated with
  1879. minWeightMagnitude 18 (15 would be enough) while actual transaction hashes are
  1880. generated with MWM ~13
  1881. Do you see the same?
  1882. The following nodes are on the testnet (mainnet is already upgraded):
  1883. udp://52.209.174.231:14800, udp://52.211.185.237:14800, udp://52.211.201.40:14800,
  1884. udp://52.214.207.109:14800 (no mutual tethering). The testnet works with a dummy
  1885. Coordinator but it's still useful for debugging.
  1886. If most of the bundles are generated within 2 minutes then there is no need to measure
  1887. the variance, we can assume that with 100x more cores you'll get a delay of the same
  1888. order of magnitude as the propagation time, just need to make sure that your algorithm
  1889. is parallelizable to such degree. If you can't outpace a legitimate transaction on its way
  1890. to Coordinator then you have to conduct an eclipse attack first. Ethan has experience in
  1891. that.
  1892. Sergey
  1893. Letter #57
  1894. Author: Neha Narula
  1895. Date: 9th of August
  1896. Hi Sergey,
  1897. Sorry, you're not crazy -- I added a bug to my code when I started doing the trunk
  1898. transaction chaining. I've since fixed it, and confirmed that these two bundles actually
  1899. *are* different.
  1900. minWeightMagnitude -- I do not understand your code well enough to know what this
  1901. should be. What should I set it to? Is what's in the current bundles sufficient (13) or
  1902. should I set it to 15?
  1903. Letter #58
  1904. Author: Sergey Ivancheglo
  1905. Date: 9th of August
  1906. Hi Neha,
  1907. minWeightMagnitude should be set to 15 for the mainnet, it means that the last 15 trits
  1908. of a transaction hash must be 0s (i.e. last 5 trytes must be 9s). I checked the bundles,
  1909. the transaction hashes are
  1910. 9Z9OZXAUCGRRYLLTNLJDALTQAFGRWACPVEIPOAPVV9WAIYZQIWQDUHXWITF
  1911. LZMJEEQEWYBMBNAWZX9999
  1912. UOFMPUZZOVYPAFYLEHKVI9T9WMMVDTE9TLDK9QXPXHY9ZNFNLLCVPRNF9YJ
  1913. TSYPNUEWPZBBKEDJLW9999
  1914. BCAXBUCQ9VQNPEFWSXXNHWNFJZYXZDYKTHTWJYEPHQYCZHNZUQQYNXIYA
  1915. PKDKCICZNOMEYERJSIBY9999
  1916. ZKDXLQTHOMLPCCSRGDYBBF9EYMOCIFEIXINNF9RENSEJUPB9UKVHVXPCKQ
  1917. MQUNWUWWWLBPGNJTWTD9999
  1918. and
  1919. JKFQJQFHCYQFPQTCWOZEWML9HDWYMZVMEKJWRBNDUSSEZIVUF99SLJNZY
  1920. JX9KRD9TLOI9ALWEOKKW9999
  1921. GCSRXZAQMAMNDRYTAHXAUWYIPOCRXJJEDCUULSTREL9IKSP9YEAWONRDV
  1922. EMXUQVPVQ9WTGPFJXQZZ9999
  1923. NMYQYBDWOFMY9CSPQTASNAPRDLZSHRWZNOENWGPLICFPXFKLUCMCMCJ9
  1924. PFDEKFIBQGFQQCPZDBERZ9999
  1925. HGJDFDGW9LXYHL99FOBOSOBUNIVVQKVDQZDJD9DTFGIIAFEOFRXHQ9DNSGJ
  1926. 9FPLVPYE9ZCDJYIVSC9999.
  1927. But according to the chain of trunk transaction references they must be
  1928. <ANY>
  1929. WALUYLVJRDESKVWYOHVTHTB9XSWCEJGPWIWGR9OMYCDLTVQJVUJQVLD9X
  1930. HHQKSRPRRWGEORCFGGKZ9999
  1931. QSAQTCBJDVBZYAUZHQZVJOZUTQUNREOFBDHHJPPXCKWMBONLXVPDWJLM
  1932. VPMITLFIIHXBDLPVXGGE99999
  1933. EMBSIPCFGAVCZPX9BMVCMBXJXYDWJC9BDWZWUMFSCTMACUVHLJQZNAQX
  1934. YDBPAUXNZIYIAELVFTNRY9999
  1935. and
  1936. <ANY>
  1937. VTJGPEDIALNEUCFULFSIGQMSFBSDYUVKXVYYNCCGHAHPQTVFRYCDI9TORP
  1938. CBLZC9ULSWVGICTKGYD9999
  1939. CYMX9ELXYX9WCTHF9OAMBGEQDARMDGCRIBBEACV9ZLYVZNTUCEZXPHRKQ
  1940. NHQRHB99BSOXZTJLKQXB9999
  1941. GOSPZKDMTSBXYDX9PEZWKIPKZWHNZHNLLMJDNDZRTDE9ENTFJFTKVBQAAV
  1942. CKNPE9YPXQLWWVXNMOC9999.
  1943. For a general case if we have a bundle with transaction hashes AAA, BBB, CCC and
  1944. DDD these transactions should look this way:
  1945. Tx AAA references BBB in “trunkTransaction” field
  1946. Tx BBB references CCC in “trunkTransaction” field
  1947. Tx CCC references DDD in “trunkTransaction” field
  1948. Tx DDD references 999…999.
  1949. Sergey
  1950. Letter #59
  1951. Author: Neha Narula
  1952. Date: 10th of August
  1953. Ah, I see the problem -- I was calculating the transaction hashes and doing proof of
  1954. work *before* signing and copying over the signature from bundle0 to bundle1, but of
  1955. course the signatures do not depend upon that, while the transaction hashes do depend
  1956. upon the signatures.
  1957. Thank you for bearing with me in this back-and-forth. I hope that I've finally correctly
  1958. constructed the two bundles:
  1959. var BUNDLE0 []giota.Trytes = []giota.Trytes{
  1960. "999…<snip>…BKE",
  1961. "T9E…<snip>…ROK",
  1962. "AZZ…<snip>…TCO","999…<snip>…CQR",
  1963. }
  1964. var BUNDLE1 []giota.Trytes =
  1965. []giota.Trytes{"999…<snip>…BKE","T9E…<snip>…ROK",
  1966. "AZZ…<snip>…TCO",
  1967. "999…<snip>…CQR",
  1968. }
  1969. Letter #60
  1970. Author: Sergey Ivancheglo
  1971. Date: 10th of August
  1972. These bundles look identical to the previous ones.
  1973. Letter #61
  1974. Author: Neha Narula
  1975. Date: 10th of August
  1976. I apologize! That's what I get for sending an email in a rushed fashion. Thank your for
  1977. continuing to bear with me.
  1978. I am really sure (this time) that these are different. The 27th tryte of the address of the
  1979. last transaction differs -- one is an R, the other is an S (look for RR9C and RS9C).
  1980. The minWeight is 15.
  1981. I hope I set up the trunk transactions appropriately. I can't seem to get a Java test to
  1982. work correctly (I haven't written Java in a long time).
  1983. Thanks,
  1984. Neha
  1985. var BUNDLEn0 []giota.Trytes = []giota.Trytes{
  1986. "999…<snip>…BKE",
  1987. "T9E…<snip>…ROK",
  1988. "AZZ…<snip>…TCO",
  1989. "999…<snip>…CQR",
  1990. }
  1991. var BUNDLEn1 []giota.Trytes = []giota.Trytes{
  1992. "999…<snip>…BKE",
  1993. "T9E…<snip>…ROK",
  1994. "AZZ…<snip>…TCO",
  1995. "999…<snip>…CQR",
  1996. }
  1997. Letter #62
  1998. Author: Sergey Ivancheglo
  1999. Date: 11th of August
  2000. They look identical to the previous ones.
  2001. Letter #63
  2002. Author: Neha Narula
  2003. Date: 11th of August
  2004. Then I sent you the right ones before -- these two bundles are absolutely not identical. I
  2005. bolded the difference below.
  2006. Do they validate in the java client?
  2007. Letter #64
  2008. Author: Sergey Ivancheglo
  2009. Date: 11th of August
  2010. Hi Neha,
  2011. You provided 3 distinct pairs of bundles, they all failed validation. While the latest pair
  2012. contains elements which differ in a single tryte they are identical to the pairs from the
  2013. previous letters. To better explain my thought I prepared a list of the bundle pairs and
  2014. their corresponding SHA-256 hashes. The hashes were generated by concatenating all
  2015. the trytes without line breaks and feeding into http://www.xorbin.com/tools/sha256-hashcalculator.
  2016. The pairs go in chronological order.
  2017. BUNDLE0 SHA-256 hash =
  2018. 9a3288b913d1c7d7e3d7135fe21b4852ec9512bf55ee9047ebaf25349c4101b4
  2019. BUNDLE1 SHA-256 hash =
  2020. 008123e1aace3cf54987ffcbeccad6a62a5fce20a3bc322f4898ce5eec0c9da5
  2021. bundle0 =
  2022. 055b6c0a16492f8f95a12ab737d0253833706e6f7505e4997e0497198adbb0b1
  2023. bundle1 =
  2024. 055b6c0a16492f8f95a12ab737d0253833706e6f7505e4997e0497198adbb0b1
  2025. BUNDLE0 = dfbb8f968a739df4fc5bf810defe1536f3dd78b2184aefcca37e1de55aa2af54
  2026. BUNDLE1 =
  2027. e48567d8d743b2f3bb17a0c303dc6a510678cc5f311f2a3f3eeef0fafa585d90
  2028. BUNDLE0 = dfbb8f968a739df4fc5bf810defe1536f3dd78b2184aefcca37e1de55aa2af54
  2029. BUNDLE1 =
  2030. e48567d8d743b2f3bb17a0c303dc6a510678cc5f311f2a3f3eeef0fafa585d90
  2031. BUNDLEn0 =
  2032. dfbb8f968a739df4fc5bf810defe1536f3dd78b2184aefcca37e1de55aa2af54
  2033. BUNDLEn1 =
  2034. e48567d8d743b2f3bb17a0c303dc6a510678cc5f311f2a3f3eeef0fafa585d90
  2035. Best,
  2036. Sergey
  2037. Letter #65
  2038. Author: Neha Narula
  2039. Date: 11th of August
  2040. Got it -- there was a misunderstanding. I thought you were saying the *bundle0* and
  2041. *bundle1* were identical, and ALSO identical to the ones sent before.
  2042. Based on an email you sent previously, I have a question. You said:
  2043. > But according to the chain of trunk transaction references they must be
  2044. > <ANY>
  2045. >
  2046. WALUYLVJRDESKVWYOHVTHTB9XSWCEJGPWIWGR9OMYCDLTVQJVUJQVLD9X
  2047. HHQKSRPRRWGEORCFGGKZ9999
  2048. >
  2049. QSAQTCBJDVBZYAUZHQZVJOZUTQUNREOFBDHHJPPXCKWMBONLXVPDWJLM
  2050. VPMITLFIIHXBDLPVXGGE99999
  2051. >
  2052. EMBSIPCFGAVCZPX9BMVCMBXJXYDWJC9BDWZWUMFSCTMACUVHLJQZNAQX
  2053. YDBPAUXNZIYIAELVFTNRY9999
  2054. >
  2055. > and
  2056. > <ANY>
  2057. >
  2058. VTJGPEDIALNEUCFULFSIGQMSFBSDYUVKXVYYNCCGHAHPQTVFRYCDI9TORP
  2059. CBLZC9ULSWVGICTKGYD9999
  2060. >
  2061. CYMX9ELXYX9WCTHF9OAMBGEQDARMDGCRIBBEACV9ZLYVZNTUCEZXPHRKQ
  2062. NHQRHB99BSOXZTJLKQXB9999
  2063. >
  2064. GOSPZKDMTSBXYDX9PEZWKIPKZWHNZHNLLMJDNDZRTDE9ENTFJFTKVBQAAV
  2065. CKNPE9YPXQLWWVXNMOC9999.
  2066. > For a general case if we have a bundle with transaction hashes AAA, BBB, CCC and
  2067. DDD these transactions should look this way:
  2068. >
  2069. > Tx AAA references BBB in “trunkTransaction” field
  2070. > Tx BBB references CCC in “trunkTransaction” field
  2071. > Tx CCC references DDD in “trunkTransaction” field
  2072. > Tx DDD references 999…999.
  2073. The piece of text is inconsistent. Based on the last paragraph, I would expect the
  2074. "<ANY>" to be in the *last* in the list, not the first.
  2075. I am operating off the premise that if a bundle b consists of four transactions, b[0], b[1],
  2076. b[2], and b[3], it is the case that b[i] includes the transaction hash of b[i+1] as its trunk
  2077. transaction, and the last transaction b[3] includes a reference to *any* transaction with
  2078. index 0, and in particular a good default is 999...999 (which corresponds to the "<ANY>"
  2079. designation you used above).
  2080. If this is true, then refer to new bundles
  2081. here: https://gist.github.com/narula/c48ff8d11aad5125ad1d359776cdc73d
  2082. And please let me know if they are valid bundles.
  2083. Letter #66
  2084. Author: Sergey Ivancheglo
  2085. Date: 11th of August
  2086. > The piece of text is inconsistent. Based on the last paragraph, I would expect the
  2087. "<ANY>" to be in the *last* in the list, not the first.
  2088. It was the other way around. We had a chain of trunk transaction references, from it we
  2089. derived the correct transaction hashes. Nothing was referencing b[0] hence it could
  2090. have any hash.
  2091. > And please let me know if they are valid bundles.
  2092. The chain of trunk transaction references allows to construct the complete bundles now.
  2093. I assume that the signatures are correct, they won’t be accepted by Coordinator
  2094. because it was upgraded but the old version would accept the signatures if the bundles
  2095. went through anti-DoS routine.
  2096. Letter #67
  2097. Author: Sergey Ivancheglo
  2098. Date: 12th of August
  2099. Hi Neha,
  2100. The below is a quantitative analysis of the demonstrated collisions. It addresses the
  2101. claims that second-preimages can be found with non-negligible chance and that full
  2102. state collisions can be found. Precisely speaking, the odds of second-preimage
  2103. collisions are shown to be below one of a million. Regarding the full state collisions,
  2104. these collisions are actually just by-products of internal state collisions, we should,
  2105. probably, agree on formal definitions. Anyway, please, reply if you disagree with
  2106. anything from the analysis.
  2107. I don’t provide a quantitative analysis of Curl-P randomness, it would take a lot of time
  2108. to show that output changes caused by input changes have binomial distribution, before
  2109. starting doing it I’d like to know when you are planning to publish Ethan’s findings.
  2110. PS: You may find our analysis not sophisticated enough. This is because Curl-P is very
  2111. simple, solving a system of equations, like Ethan did, is an overkill.
  2112. ----------
  2113. A typical bundle transferring value consists of 4 transactions:
  2114. Transaction #0: A deposit of AAA iotas to a recipient's address
  2115. Transaction #1: A withdrawal of BBB iotas from a sender's address
  2116. Transaction #2: A withdrawal of 0 iotas from the sender's address
  2117. Transaction #3: A deposit of (BBB-AAA) iotas to a sender's address (the change)
  2118. To assess the percentage of the bundles which can have a single trit changed
  2119. in "address" field without having the bundle hash changed as well, we should
  2120. pay attention to function F(A, B) which is the main part of the S-box.
  2121. The truth table of F() is:
  2122. | - | 0 | + | <- A
  2123. ----------------
  2124. - | + | 0 | - |
  2125. ----------------
  2126. 0 | + | - | 0 |
  2127. ----------------
  2128. + | - | + | 0 |
  2129. ----------------
  2130. ^ \
  2131. | \
  2132. B F(A, B)
  2133. As we see, if A = -1 then flipping B between -1 and 0 doesn't change F().
  2134. The same is true if A = 1 and B = 0 / 1.
  2135. Another observation:
  2136. By changing a single trit (input) of Curl-P state in the beginning of a round
  2137. we can change not more than 2 trits (output) in the end of the round.
  2138. The changed output trits depend on the changed input trit and 2 other input
  2139. trits which are kept unchanged.
  2140. Let's denote the first changed output trit as ALPHA and the second changed
  2141. output trit as BETA. Let's denote the changed input trit as XXX and the
  2142. remaining 2 input trits as C1 and C2 (they are constants).
  2143. We can write that:
  2144. ALPHA = F(XXX, C1)
  2145. and
  2146. BETA = F(C2, XXX)
  2147. By using exhaustive search we get that out of all possible combinations of
  2148. input values (27) and all possible ways to change XXX (just 2, which are
  2149. increment and decrement) we get 54 variants. Only 12 of them lead to a change
  2150. of a single output trit, the remaining 42 variants change 2 output trits.
  2151. Note that none of the variants allows to keep all output trits unchanged thus
  2152. showing that full state collision within a single transform() invocation is
  2153. impossible for any number of rounds.
  2154. Out of those 12 variants none includes a combination with internal state having
  2155. only zeros, this means that the address of Transaction #0 can't be changed.
  2156. Transactions #1 and #2 can't be changed without failing the signature
  2157. verification in the most cases. Transaction #4 is the only option left.
  2158. So, we have 243 trits of an address from Transaction #4. Our goal is to change
  2159. a single trit in such a way that an avalanche of the propagated changes affects
  2160. only first 243 trits of Curl-P state. This trick allows to generate a collision
  2161. because the next absorbed 243 trits (value+timestamp+etc.) will overwrite
  2162. the changes anyway. To simplify the analysis we'll do the following trade based
  2163. on the observation that a single change in a typical input to Curl-P requires
  2164. 11-15 rounds for a full diffusion to happen (full diffusion leads
  2165. to ~2/3 of the output trits changed):
  2166. We reduce the number of rounds from 27 to 13 (=(11+15)/2) and allow a single
  2167. output trit change to happen anywhere in the state.
  2168. We model our attack as a game consisting of 13 rounds. During a single round we
  2169. win with probability 12/54. To win the game, all 13 rounds must be won. The
  2170. probability to win the game by changing a single trit from 243 trits of an
  2171. address is
  2172. (12/54)^13 or ~0.0000000032.
  2173. For a single address we can attempt 243 games. The probability of winning in
  2174. at least 1 game in this case is
  2175. 1 - ProbabilityOfLosingInAllGames
  2176. or
  2177. 1 - (1 - (12 / 54) ^ 13) ^ 243
  2178. or
  2179. ~0.00000078
  2180. according to www.wolframalpha.com.
  2181. The physical meaning of our analysis results is the following:
  2182. In a long run we need to process 1 million bundles (or more than 4 million
  2183. transactions) to be able to conduct the attack successfully.
  2184. ----------
  2185. Sergey
  2186. Letter #68
  2187. Author: Sergey Ivancheglo
  2188. Date: 13th of August
  2189. Hi Ethan,
  2190. It's been a long time since we've heard anything from you. We thought you were busy
  2191. with other projects so we analyzed your words related to EU-CMA security of IOTA
  2192. signature scheme without distracting you. At this point we believe we found a mistake
  2193. (in your chain of thoughts) which had led to the false claim of the EU-CMA security
  2194. being broken.
  2195. In one of the letters you linked us to http://www.cs.tau.ac.il/~canetti/f08-
  2196. materials/scribe8.pdf as your choice of EU-CMA definition. We were confused by the
  2197. fact that you preferred such an oversimplified definition which barely has any use
  2198. outside of teaching students the basics of Cryptography but later we realized that you
  2199. provided that definition assuming that we didn’t have cryptographers in our team (thank
  2200. you for your attempts to make everything as clear to us as possible). We don’t know
  2201. what definition you prefer to use but it very likely has an equivalent to this fragment:
  2202. ----------
  2203. The verification algorithm is deterministic, that is, for any vk, m, s:
  2204. Prob[Ver(vk, m, s) = accept] ∈ {0, 1}
  2205. In other words, it is not possible that the verification algorithm accepts a signature in
  2206. one run but
  2207. rejects it in another.
  2208. ----------
  2209. This is where your and our points of view diverge.
  2210. As we wrote, Satoshi’s invention led to a paradigm shift in Cryptography (to some
  2211. degree, some cryptographers still resist this change refusing to think outside of the box)
  2212. and this shift forces us to critically review old definitions and to create new ones more
  2213. suitable to our needs. If you remember, our team is not a big fan of “appeal to authority”,
  2214. still the following words from “Constructing Cryptographic Definitions” by Phillip
  2215. Rogaway (http://web.cs.ucdavis.edu/~rogaway/papers/iscisc.pdf) should be repeated:
  2216. “I would emphasize that definitions are not written in stone. They emerge, change, and
  2217. die out far more often than people imagine. They are part of a dialectic within a
  2218. community.”
  2219. This is about our very case.
  2220. The signature verification oracle in IOTA is not deterministic. While it doesn’t reject
  2221. signatures which were accepted, it can reject a signature at one moment and then
  2222. accept it later. The oracle runs inside Coordinator, its reports are published on the
  2223. tangle as milestones.
  2224. It’s worth noting that the approach of relying on a public ledger for signature verification
  2225. is not unique to IOTA. The idea was explored by several people, e.g. in “MAVE, NEW
  2226. LIGHTWEIGHT DIGITAL SIGNATURE PROTOCOLS FOR MASSIVE
  2227. VERIFICATIONS” by SERGIO DEMIAN LERNER
  2228. (https://bitslog.files.wordpress.com/2012/04/mave1.pdf) and “Fawkescoin, A
  2229. cryptocurrency without public-key cryptography” by Joseph Bonneau and Andrew Miller
  2230. (http://www.jbonneau.com/doc/BM14-SPW-fawkescoin.pdf). We are sure you won’t be
  2231. questioning the expertise of the mentioned persons, so we ask you to provide a
  2232. definition of EU-CMA security that could be applied to MAVE and Fawkescoin, after that
  2233. we’ll use it to verify your claim of IOTA’s EU-CMA security being broken.
  2234. PS: If you find time for something outside of the main topic of these letters we would be
  2235. happy to discuss implications of blockchains on old cryptographic algorithms like the
  2236. one described in "Constructing digital signatures from one-way functions" by Leslie
  2237. Lamport.
  2238. Sergey
  2239. Letter #69
  2240. Author: David Sønstebø
  2241. Date: 22nd of August
  2242. Hello all,
  2243. It has been 10 days without an update at this point, is this still being worked out or
  2244. should the statements and claims be publicly retracted? We have been working around
  2245. the clock to ensure 100% best practices, but so far what we have received is
  2246. inconclusive and no clarification on the very bold statements made by Ethan.
  2247. Our cryptographers are starting to wonder what this is all about at this point, so it would
  2248. be good to conclude this ASAP. We have a community of 100K+ people at this point
  2249. and everyone will be eager to have these claims properly audited and verified/falsified
  2250. ASAP.
  2251. Best,
  2252. David
  2253. Letter #70
  2254. Author: Neha Narula
  2255. Date: 22nd of August
  2256. Hi David,
  2257. We've had a few time-consuming things going on on our end. A response is
  2258. forthcoming. Unfortunately it might not be on the time frame you'd like.
  2259. Best,
  2260. Neha
  2261. Letter #71
  2262. Author: Neha Narula
  2263. Date: 1st of September
  2264. Hi,
  2265. I'm not sure how to respond to the previous set of emails, I find them confusing. If you'd
  2266. like a response to something specific, please simplify and clarify and I'll do my best! We
  2267. do still maintain that EU-CMA security is broken.
  2268. We have produced a set of bundles which we believe could be used to steal funds, as
  2269. follows. Could you verify that these bundles validate according to the state of IOTA
  2270. before you hard forked?
  2271. Eve is sending the bundle to Alice to sign.
  2272. In STEAL_BUNDLE0:
  2273. - tx0 50000 spend
  2274. - tx1 -939211930 fund, alice's sig
  2275. - tx2 0, alice's sig
  2276. - tx3 100 to eve
  2277. - tx4 0
  2278. - tx5 939161830 to alice2
  2279. - tx6 0
  2280. In STEAL_BUNDLE1:
  2281. - tx0 50000 spend
  2282. - tx1 -939211930 fund, alice's sig
  2283. - tx2 0, alice's sig
  2284. - tx3 129140263 to eve
  2285. - tx4 0
  2286. - tx5 810021667 to alice2
  2287. - tx6 0
  2288. var STEAL_BUNDLE0 []string = []string{
  2289. "999…<snip>…BKE",
  2290. "NER…<snip>…ROK",
  2291. "AZZ…<snip>…MTCO",
  2292. "999…<snip>…BKE",
  2293. "999…<snip>…BKE",
  2294. "999…<snip>…CQR",
  2295. "999…<snip>…BKE",
  2296. }
  2297. var STEAL_BUNDLE1 []string = []string{
  2298. "999…<snip>…BKE",
  2299. "NER…<snip>…ROK",
  2300. "AZZ…<snip>…TCO",
  2301. "999…<snip>…BKE",
  2302. "999…<snip>…BKE",
  2303. "999…<snip>…CQR",
  2304. "999…<snip>…BKE",
  2305. }
  2306. Thanks,
  2307. Neha
  2308. Letter #72
  2309. Author: Sergey Ivancheglo
  2310. Date: 2nd of September
  2311. Hi,
  2312. > We have produced a set of bundles which we believe could be used to steal funds, as
  2313. follows. Could you verify that these bundles validate according to the state of IOTA
  2314. before you hard forked?
  2315. One of the bundles is not valid, but it shouldn’t be hard to fix it, just write the correct
  2316. bundle hash into the corresponding field and redo the PoW.
  2317. We see you used tx4 to “decouple” probabilities of finding inner collisions for tx3 and
  2318. tx5. Does this mean you will retract the claim of Curl-P not being pseudo-random?
  2319. > If you'd like a response to something specific, please simplify and clarify and I'll do my
  2320. best!
  2321. Perhaps it will be easier to get the full overview if you can send over the draft you intend
  2322. to publish. Seeing it in advance would also help to reduce the gap between your and
  2323. our publications. Any ETA on your publication, by the way?
  2324. Sergey
  2325. Letter #73
  2326. Author: Neha Narula
  2327. Date: 6th of September
  2328. OK. I think I did that! Thank you for validating bundles over an email transport layer.
  2329. ETA is that we are ready to publish. Here is a copy of our vulnerability report. We
  2330. would greatly appreciate it if you could let us know if there are any mistakes.
  2331. ## IOTA Vulnerability Report: Cryptanalysis of the Curl Hash Function Enabling
  2332. Practical Signature Forgery Attacks on the IOTA Cryptocurrency
  2333. Authored by Ethan Heilman, Neha Narula, Thaddeus Dryja, Madars Virza
  2334. **Summary:** We present attacks on the cryptography used in the IOTA blockchain
  2335. including under certain conditions the ability to forge signatures. We have developed
  2336. practical attacks on IOTA’s cryptographic hash function Curl, allowing us to quickly
  2337. generate short colliding messages. These collisions work even for messages of the
  2338. same length. Exploiting these weaknesses in Curl, we break [the EU-CMA
  2339. security](http://www.cs.tau.ac.il/~canetti/f08-materials/scribe8.pdf) of the IOTA signature
  2340. scheme. Finally we show that in a chosen message setting we can forge signatures of
  2341. valid spending transactions (called bundles in IOTA). We present and demonstrate a
  2342. practical attack whereby an attacker could exploit this vulnerability in IOTA to steal
  2343. funds from an IOTA user. This report provides example demonstrations of these
  2344. vulnerabilities but does not detail the exact cryptanalytic process to generate the
  2345. collisions. A second publication will provide an in-depth study of our cryptanalysis of
  2346. Curl.
  2347. **Responsible Disclosure statement:** This report is the product of a responsible
  2348. disclosure process. Prior to publishing this report we disclosed these vulnerabilities to
  2349. the IOTA developers. In response the IOTA developers have updated IOTA to no longer
  2350. use the Curl hash function to hash transactions as part of the IOTA signing process.
  2351. Curl is still used for other purposes in IOTA. We are now publishing our attacks since
  2352. the IOTA developers have deployed their fixes. See our timeline of events below.
  2353. Our analysis is based only on publicly available information including the [IOTA open
  2354. source repos on github](https://github.com/iotaledger), [the IOTA
  2355. forum](https://forum.iota.org/) and email discussions with the IOTA developers during
  2356. the disclosure process. At no time did we send any of these forged signatures to the
  2357. IOTA network or interfere in the IOTA network in any way. We validated all of our
  2358. attacks offline using publicly available libraries.
  2359. ### 1. Systems Impacted:
  2360. * **The Cryptographic Hash Function Curl:** The cryptographic hash function Curl
  2361. designed by the IOTA project has serious weaknesses. We have demonstrated
  2362. practical attacks which break Curl's collision resistance for messages of different length
  2363. and the same length. We also demonstrate additional non-random behavior between
  2364. certain classes of related messages, namely messages which are bit rotations of other
  2365. messages. Curl should not be relied on for randomness or collision resistance. IOTA is
  2366. still using Curl for transaction ID generation and for proof of work, we present no
  2367. practical attacks against these uses. We provide examples of collisions and nonrandom
  2368. behavior at the end of the report.
  2369. * **Prior versions of IOTA:** The signature scheme used by IOTA prior to recent
  2370. updates relied on the collision resistance of Curl for hashing messages as part of the
  2371. signature algorithm. The attacks we developed against Curl lead to practical signature
  2372. forgery attacks against payments in IOTA. We provide an example forged signature on
  2373. a valid IOTA payment (before the fix was deployed) at the of the report.
  2374. **Mitigations:** On Aug 7 2017 IOTA deployed [a
  2375. hardfork](https://blog.iota.org/upgrades-updates-d12145e381eb) to their system to stop
  2376. using Curl for signature message hashing. In order to perform the upgrade, trading was
  2377. [halted on Bitfinex](https://www.bitfinex.com/posts/215) for [roughly 3
  2378. days](https://twitter.com/bitfinex/status/895915034102177792). All users who hold IOTA
  2379. directly (not via an exchange) must [upgrade their wallets and
  2380. addresses](https://blog.iota.org/new-gui-transition-phase-explained-b536ed80f412).
  2381. The signature forgery vulnerability was fixed in [IOTA Reference Implementation (IRI)
  2382. version 1.3](https://github.com/iotaledger/iri/releases/tag/v1.3), [IOTA wallet version
  2383. 2.4.0](https://github.com/iotaledger/wallet/releases/tag/v2.4.0).
  2384. ### 2. Disclosure Timeline
  2385. * **July 14 2017:** We disclosed a weaknesses in the Curl hash function to the IOTA
  2386. developers and informed them that we were making steady progress on additional
  2387. attacks. Because of these weaknesses we recommended that they replace the Curl
  2388. hash function with a recognized and publicly vetted hash function. This disclosure
  2389. included example collisions on messages of different lengths and an example of nonpseudo-randomness.
  2390. * **July 22 2017:** We disclosed improved attacks on Curl and showed how these
  2391. attacks could break the collision resistance of Curl even for messages of the same
  2392. length. We also outlined how we could use these collisions to break the EU-CMA
  2393. security of the IOTA signature scheme. This disclosure included an example collision
  2394. we created via [differential
  2395. cryptanalysis](https://en.wikipedia.org/wiki/Differential_cryptanalysis).
  2396. * **July 25 2017:** After continued discussion, the IOTA developers proposed a timeline
  2397. for fixing these vulnerabilities. On Aug 5th Curl would be replaced with the [KECCAK
  2398. hash function (also known as SHA-3)](https://en.wikipedia.org/wiki/SHA-3). Then on
  2399. Aug 5th-10th users would move their tokens from Curl to KECCAK. On Aug 12th the
  2400. IOTA devs would disclose the existence of the vulnerability.
  2401. * **Aug 7 2017:** On Aug 7th the IOTA developers [merged
  2402. code](https://github.com/iotaledger/iri/commit/539e413352a77b1db2042f46887e41d558
  2403. f575e5) which replaced Curl with a hash function they named
  2404. [Kerl](https://github.com/iotaledger/kerl) which according to [the Kerl specification is a
  2405. ternary variant of the KECCAK hash
  2406. function](https://github.com/iotaledger/kerl/blob/master/IOTA-Kerl-spec.md). Around this
  2407. same time the IOTA developers posted a blog entry titled ["Upgrades &
  2408. Updates"](https://blog.iota.org/upgrades-updates-d12145e381eb) which discussed the
  2409. reasons for moving away from Curl stating:
  2410. >Creating a new cryptographic hash function is no trivial undertaking, even when it is
  2411. being built on preexisting world class standards. “Don’t roll your own crypto” is a
  2412. compulsory uttered mantra that serves as a good guiding principle for 99.9% of projects,
  2413. but there are exceptions to the rule. When spearheading technology for a new paradigm
  2414. this statement is no longer axiomatic. Progress must march on. Therefore audits,
  2415. reviews and continued research on Curl has been a given from day 1. One of the
  2416. cryptographers we reached out to months ago to review Curl has disclosed that he is
  2417. worried there might be a potential vulnerability in Curl. We have since had our internal
  2418. team, as well as other cryptographers review it and asked the disclosing party for more
  2419. information. While the party that did the responsible disclosure has been quite
  2420. forthcoming, there are still some of the last details to be discussed more thoroughly with
  2421. the respective teams in order to reproduce the claims and verify if there was even any
  2422. vulnerability.
  2423. >However, even though we have protection mechanisms in place that would render
  2424. even most valid attacks useless in this ‘training wheel stage’ (due to the Coordinator
  2425. and the higher-level protocol), as you are working on the cutting edge you have to take
  2426. every precaution possible and always be on guard. Therefore we have made the simple
  2427. decision to temporarily switch Curl with Keccak (SHA-3) for cryptographic signing in
  2428. IOTA. - ["David Sønstebø - Upgrades & Updates"](https://blog.iota.org/upgradesupdates-d12145e381eb)
  2429. * **Aug 10 2017:** We sent the IOTA developers valid IOTA payments (bundles in
  2430. IOTA terminology) with different output addresses which hash to the same value under
  2431. Curl as used in IOTA signatures (prior to the Aug 7th fix). This showed that not only
  2432. could we forge signatures for some messages, but that these messages could be valid
  2433. payments in IOTA.
  2434. * **Sept 1 2017:** We sent the IOTA developers valid IOTA payments which pay out
  2435. different amounts and hash to the same value under Curl as used in IOTA signatures.
  2436. This showed that under certain circumstances an attacker could exploit this cryptologic
  2437. vulnerability in Curl to steal funds (prior to the Aug 7th fix). In the example Alice signs a
  2438. payment paying Eve 100 IOTA, and Eve can use the signature on this payment to
  2439. authorize a payment where Eve receives 129140263 IOTA from Alice's funds.
  2440. ### 3. IOTA Background
  2441. The IOTA network launched July 11, 2016 and its token was listed on Bitfinex on June
  2442. 14, 2017. A fixed supply of 2.77 Billion MIOTA (currency units) was created when the
  2443. network was launched. 1 MIOTA (mega/million IOTA) is equal to 1,000,000 IOTA. As of
  2444. [YYY IOTA has a market capitalization of
  2445. YYY](https://coinmarketcap.com/currencies/iota/historicaldata/?start=20170819&end=20170820)
  2446. making it the YYY most valuable blockchain
  2447. based cryptocurrency by market cap.
  2448. IOTA as it is currently deployed has several uncommon design features and
  2449. terminology:
  2450. * [IOTA is built on the concept of a tangle](https://iota.org/IOTA_Whitepaper.pdf)
  2451. (known also as a DAGchain or Directed Acyclic Graph Blockchain) where instead of a
  2452. single chain of blocks, transactions are linked together in a graph. A transaction is a
  2453. simple object specifying an address, signature, value, tag, and a few other fields. A
  2454. group of transactions which together specify a transfer is called a bundle; in a bundle,
  2455. [transactions roughly correspond to Bitcoin inputs or
  2456. outputs](https://forum.iota.org/t/what-are-the-4-contents-of-a-bundle/2211). Each
  2457. transaction must include a small amount of proof of work, and point to two other
  2458. transactions already in the Tangle.
  2459. * IOTA uses [balanced ternary](https://en.wikipedia.org/wiki/Balanced_ternary) (base 3)
  2460. instead of binary (base 2). That is *trits* and *trytes* instead of *bits* and *bytes*. A
  2461. tryte consists of three trits.
  2462. * IOTA currently relies on a trusted party called a coordinator [to approve and
  2463. checkpoint state](http://www.tangleblog.com/2017/01/25/the-tech-behind-iotaexplained/).
  2464. This has led to concerns that [IOTA is
  2465. centralized](https://medium.com/@ercwl/iota-is-centralized-6289246e7b4d). The IOTA
  2466. developers argue [IOTA is not centralized and that this is a temporary measure "to
  2467. provide 34% attack protection"](https://blog.iota.org/the-transparency-compendium26aa5bb8e260).
  2468. The code for the coordinator is not open source.
  2469. ### 4. Practical Attacks Against the Cryptographic Hash Function Curl
  2470. The IOTA team designed their own cryptographic hash function called Curl. It is used
  2471. for a number of purposes in IOTA including transaction address creation, message
  2472. digest creation, Proof-of-Work (PoW) and hash-based signatures. Unlike most
  2473. cryptographic hash functions, Curl operates on base-3 numbers called [“balanced
  2474. ternary”](https://en.wikipedia.org/wiki/Balanced_ternary). Curl is built on the popular
  2475. [sponge construction](https://en.wikipedia.org/wiki/Sponge_function).
  2476. Curl takes a message, breaks it into message blocks and then interatively copies each
  2477. message block into the current state and runs Transform on the state it update the
  2478. state.
  2479. ```
  2480. Curl(message)
  2481. # the state consists of 729 trits. It is initalized to all zero.
  2482. state = [0]*729
  2483.  
  2484. # The message is broken into message blocks of size 243
  2485. MB_0, MB_1, ... MB_n = split(message)
  2486. for MB_i in MB_0, MB_1, ... MB_n:
  2487. # The current message block is copyed into the first 243 trits of the state
  2488. state[0:243] = MB_i
  2489. state = Transform(state)
  2490.  
  2491. # The output is the first 243 trits of the state
  2492. output = state[0:243]
  2493. return output
  2494. ```
  2495. The function Transform used by Curl is an unkeyed [permutation substitution
  2496. network](https://en.wikipedia.org/wiki/Substitution-permutation_network).
  2497. ```
  2498. Transform(state)
  2499. for round in 27
  2500. i = 0
  2501. new_state = [0]*729
  2502. for pos in 729
  2503. i = j
  2504. j += (364 if j < 365 else -365)
  2505. x = state[i]; y = state[j]
  2506. z = sbox[x, y]
  2507. new_state[pos] = z
  2508.  
  2509. state = new_state
  2510. return new_state
  2511. ```
  2512. The sbox takes two trits and returns a third trit.
  2513. ```
  2514. y: -1, 0, 1
  2515. x: -1 [1, 1, -1]
  2516. x: 0 [0, -1, 1]
  2517. x: 1 [-1, 0, 0]
  2518. ```
  2519. A close inspection of the Curl source code revealed that Curl was vulnerable to a well
  2520. known technique for breaking hash functions called [differential
  2521. cryptanalysis](https://en.wikipedia.org/wiki/Differential_cryptanalysis). Using this
  2522. observation, we were able write software that could quickly generate practical collisions
  2523. for messages of the same lengths. Since these collisions fully collide the internal state
  2524. of the hash function, a single collision enables us to generate an unbounded number of
  2525. additional colliding messages. These collisions are for all rounds of Curl and can be
  2526. generated in seconds on commodity hardware. The nature of our attack allows us great
  2527. control over values of the colliding messages.
  2528. Thus, Curl as used in IOTA does not provide collision resistance. We have provided
  2529. example collisions and non-pseudo random behavior at the end of this report. In the
  2530. next section we will show how we exploit these collisions to break the EU-CMA security
  2531. of IOTA's signature scheme.
  2532. ### 5. Breaking the EU-CMA Security of the IOTA Signature Scheme
  2533. IOTA uses a signature scheme based on [Winternitz One-Time Signatures
  2534. (WOTS)](https://cryptoservices.github.io/quantum/2015/12/04/one-time-signatures.html)
  2535. with an important difference: IOTA operates on [the hashes of
  2536. messages](https://github.com/iotaledger/iota.lib.java/blob/f43d606f041d1bf6eceb44d67
  2537. 58b710149b15d0a/src/main/java/jota/utils/Signing.java#L186) instead of operating
  2538. directly on messages as is done WOTS. This is a critical difference since [WOTS only
  2539. requires that the hash function is a One Way
  2540. Function](https://eprint.iacr.org/2011/191.pdf), whereas the IOTA signature scheme
  2541. requires that the hash function must also be collision resistant. Important for our attack
  2542. is that if two messages, msg1 and msg2, hash to the same output, a signature on msg1
  2543. will also verify as a signature on msg2.
  2544. ```
  2545. IOTA_Sign(SK, msg):
  2546. h_msg = CURL_Hash(msg)
  2547. sig = WOTS_Sign(SK, h_msg)
  2548. return sig
  2549. ```
  2550. Before explaining more we need to provide some background on how the security of a
  2551. digital signature scheme is defined. The standard security definition for a digital
  2552. signature schemes is called Existential Unforgeability against a Chosen Message Attack
  2553. or [EU-CMA](http://www.cs.tau.ac.il/~canetti/f08-materials/scribe8.pdf). Let’s break
  2554. down what this means:
  2555. * Existential Unforgeability (EU) means that the attacker can should not be able to forge
  2556. signatures for any messages even if the messages are complete nonsense.
  2557. * A Chosen Message Attack (CMA) is an attack in which the attacker is given complete
  2558. control to choose any messages on which to perform the attack.
  2559. Thus, EU-CMA security guarantees that even if the attacker chooses two messages
  2560. msg1, msg2 and the signer signs msg1, the attacker should not be able to find a valid
  2561. signature for msg2.
  2562. **Breaking the EU-CMA security of IOTA’s signature scheme:**
  2563. In our attack a malicious user, Eve, tricks a user Alice by asking Alice to sign a
  2564. message msg1 and then later produces a different message, msg2, which also verifies
  2565. under that signature.
  2566. <pre>
  2567. (1). Eve uses our collision attack on Curl to chooses two messages, msg1, msg2 such
  2568. that:
  2569. CURL_Hash(msg1) = CURL_Hash(msg2) and msg1 != msg2
  2570. (2). Eve sends msg1 to Alice and asks Alice to sign it.
  2571. (3). Alice sends Eve a signature on msg1:
  2572. sig1 = IOTA_Sign(SK,msg1)
  2573. (4). Eve produces a valid signature,message pair (sig1,msg2) where msg1 is a
  2574. message which Alice has not signed.
  2575. msg1 != msg2 AND IOTA_Sign(SK, msg1) == IOTA_Sign(SK, msg2)
  2576. </pre>
  2577. By definition Alice has broken the EU-CMA security of IOTA’s signature scheme.
  2578. **Forging Signatures on IOTA Payments:**
  2579. IOTA uses a bundle to represent a transfer of value; a bundle consists of multiple
  2580. transactions. These transactions specify the inputs and outputs of the transfer. We were
  2581. able to produce two bundles which differ by only one or two trits but hash to the same
  2582. value, and so have the same signature. We can demonstrate a practical attack where
  2583. we cause an IOTA user to lose funds.
  2584. A transaction in IOTA has the following fields:
  2585. <pre>
  2586. SignatureMessageFragment,
  2587. Address,
  2588. Value,
  2589. Tag,
  2590. Timestamp,
  2591. CurrentIndex,
  2592. LastIndex,
  2593. BundleHash,
  2594. TrunkTransactionID,
  2595. BranchTransactionID,
  2596. Nonce
  2597. </pre>
  2598. A bundle consists of multiple transactions, containing credits to the receiving addresses,
  2599. debits from the spending addresses, and extra empty transactions which hold parts of
  2600. the signature. Tags are only constrained by length, which we use to set up our
  2601. attacks. The total value across all transactions in a bundle must sum to zero, and every
  2602. transaction must contain two pointers to other valid transactions in the IOTA tangle (the
  2603. trunk and branch transactions). A transaction ID is constructed by hashing the
  2604. concatenation of every field in a transaction. The convention is that within a bundle,
  2605. each transaction points to the transaction after it as its trunk transaction, and the last
  2606. transaction in the bundle points to some other first transaction in a different valid bundle.
  2607. The nonce must be calculated to provide sufficient proof of work for the transaction to
  2608. get accepted into the tangle -- at the time of writing, this required that the transaction
  2609. hash (including the nonce) ends with at least fifteen zero trits.
  2610. A user signs the hash of a bundle. A BundleHash, unlike a transaction hash, does not
  2611. use all the fields in each transaction in the bundle. Instead, it is constructed by hashing
  2612. the concatenation of only the following fields:
  2613. <pre>
  2614. Address,
  2615. Value,
  2616. Tag,
  2617. Timestamp,
  2618. CurrentIndex,
  2619. LastIndex
  2620. </pre>
  2621. of all transactions in the bundle.
  2622. **Waste money attack:**
  2623. We use our method for generating collisions to construct two valid IOTA bundles which
  2624. collide on one trit in the Address fields.
  2625. <pre>
  2626. Alice wants to pay Eve:
  2627. (1). Eve creates two colliding bundles; bundle1 and bundle2. Bundle1 spends some of
  2628. Alice’s funds and pays to Addr1. Bundle2 also spends some of Alice’s funds but differs
  2629. in that it pays out to a slightly different address, addr2.
  2630. (2). Eve asks Alice to pay Eve by signing bundle1, that is paying out to addr1.
  2631. (3). Alice broadcasts the signature and bundle1.
  2632. (4). Eve takes the signature off of bundle1 and uses it on bundle2 which she then
  2633. broadcasts and ensures is accepted by the network. To do this she can use eclipse
  2634. attacks against Alice, have better network propagation, or use proof of work to rapidly
  2635. confirm bundle2 over bundle1.
  2636. (5). Eve then tells Alice that Alice paid to the wrong addr and shows that Alice signed a
  2637. transaction spending out to addr2 not addr1 as Eve asked. Eve then asks to be paid
  2638. again.
  2639. </pre>
  2640. Similar attacks, based on [transaction malleability have been claimed to be used in
  2641. Bitcoin to trick cryptocurrency exchanges into spending payments multiple
  2642. times](https://www.coindesk.com/study-finds-mt-gox-lost-386-bitcoins-due-transactionmalleability/).
  2643. This particular attack here is both more serious than transaction
  2644. malleability attacks in Bitcoin since it exploits a deep cryptographic flaw in IOTA
  2645. allowing signature forgeries, whereas transaction malleability does not allow signature
  2646. forgeries.
  2647. **Steal money attack:**
  2648. We use our method for generating collisions to construct two valid IOTA bundles which
  2649. collide twice on different trits. If Alice signs a bundle, bundle1, which pays Eve 100
  2650. IOTA from Alice's funds. Eve can use the signature on bundle1 as a valid signature on
  2651. bundle2 which pays Eve 129140263 IOTA from Alice's funds.
  2652. <pre>
  2653. Alice wants to pay Eve:
  2654. (1). Eve creates two colliding bundles; bundle1 and bundle2. Bundle1 spends
  2655. 939211930 IOTA from Alice’s address and pays 100 IOTA to Eve and 939211830 IOTA
  2656. in change back to Alice. Bundle2 also spends some of Alice’s funds but differs in that it
  2657. instead pays 129140263 IOTA to Eve and only 810071667 IOTA in change back to
  2658. Alice.
  2659. (2). Eve asks Alice to pay Eve by signing bundle1, that is paying 100 to Eve and send
  2660. the change 939211830 back to Alice.
  2661. (3). Alice broadcasts the signature and bundle1.
  2662. (4). Eve takes the signature off of bundle1 and uses it on bundle2 which she then
  2663. broadcasts and ensures is accepted by the network. To do this she can use eclipse
  2664. attacks against Alice, have better network propagation, or use proof of work to rapidly
  2665. confirm bundle2 over bundle1.
  2666. (5). When Bundle2 is confirmed, Eve will have stolen 129140163 IOTA from Alice.
  2667. </pre>
  2668. This is an extremely serious attack as a signature attesting that "Alice pays Eve 100
  2669. IOTA", can also attest to "Alice pays Eve 129140263 IOTA" without Alice ever agreeing
  2670. to pay Eve 129140263 IOTA. Signatures using Curl can no longer be trusted to
  2671. authorize transactions.
  2672. ### 6. Proof-of-Concept - Curl Attack Examples
  2673. We provide examples of colliding messages for the Curl hash function and nonrandomness.
  2674. Our first two examples can be replicated using [a short python proof-ofconcept
  2675. program we have made available](https://github.com/mit-dci/tangledcurl/blob/master/curlexamples.py).
  2676. We also provide longer colliding messages which
  2677. can be replicated using the ccurl-digest commandline tool.
  2678. **Short colliding messages:**
  2679. Two messages which collide and differ by a single position. Our python code for
  2680. replicating this can be found here.
  2681. ```
  2682. msg1 =
  2683. "RETHT9ES9HRCUITBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZ
  2684. HFZEHGATZXZAUPGVEKNMQXFVRXHF9QJQHUTILIPIXUYRVSJEIOJDRIUVWMUA
  2685. BSIKIBAKENE9KVFJUEQUHFRVGELFGJIDXQARWH99XTORHXRETHT9ES9HRCUI
  2686. TBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZHFZEHGATZXZAUP
  2687. GVEKNMQXFVR"
  2688. msg2 =
  2689. "RETHT9ES9HRCUITBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZ
  2690. HFZEHGATZXZAUPGVEKNMQXFVRXHF9QJQHUTILIPIXUYRVSJEIPJDRIUVWMUA
  2691. BSIKIBAKENE9KVFJUEQUHFRVGELFGJIDXQARWH99XTORHXRETHT9ES9HRCUI
  2692. TBHVCUHOBPUUUHT9PHLUNWRWGKBKF9YUMDWRXTRVGZHFZEHGATZXZAUP
  2693. GVEKNMQXFVR"
  2694. >hash1 = H(msg1)
  2695. GIUNBQRBI9RJQPNDVSSMUFMTLAKWTGYDMGBUYZAJNOJSKXWTYBV9QO9LB
  2696. AIEUANAXAIUTHKMNGRZKLSZN
  2697. >hash2 = H(msg2)
  2698. GIUNBQRBI9RJQPNDVSSMUFMTLAKWTGYDMG~~~~~~~~BUYZAJNOJSKXWTYB
  2699. V9QO9LBAIEUANAXAIUTHKMNGRZKLSZN
  2700. >print hash1 == hash2, msg1 == msg2
  2701. True False
  2702. ```
  2703. **Non-randomness:**
  2704. Two messages which are bit rotations of each other when hashed result in outputs
  2705. which are also bit rotations of each other. For example we choose the string
  2706. KENNYLOGGINS.
  2707. ```
  2708. msg1 =
  2709. b'9999KENNYLOGGINS99999999999999999999999999999999999999999999999999
  2710. 999999999999999'
  2711. msg2 =
  2712. b'9KENNYLOGGINS99999999999999999999999999999999999999999999999999999
  2713. 999999999999999'
  2714. hash1 = H(msg1)
  2715. OBIVYFRBFRPRVNYMJFUGYYYFHREPKJWGLWCUSKDBQVOZSFYOPPOYGFTP
  2716. QQA9ZMSYE99CMCYEELGEFRDTU
  2717. hash2 = H(msg2)
  2718. VYFRBFRPRVNYMJFUGYYYFHREPKJWGLWCUSKDBQVOZSFYOPPOYGFTPQQA
  2719. 9ZMSYE99CMCYEELGEFRDTUXMW
  2720. ```
  2721. Notice that the hash2 is exactly the same as hash1 but shifted by three characters:
  2722. hash1 = OBI**VYFRBFRPRV**..., hash2 = **VYFRBFRPRV**...
  2723. **Long colliding messages:** Since the [ccurl digest commandline
  2724. tool](https://github.com/iotaledger/ccurl) made availaible by IOTA only works for msgs of
  2725. exactly 2673 Trytes long, we provide colliding messages of length 2673. We used the
  2726. lyrics to the [80’s hit single “push it to the
  2727. limit”](https://en.wikipedia.org/wiki/Scarface_(Push_It_to_the_Limit)in the colliding
  2728. messages to demonstrate that we fully collide the internal state of curl and thus giving
  2729. us arbitrary control over most of the message. We note that this internal state collision
  2730. enables us to instantly create an unbounded number of other colliding messages.
  2731. ```
  2732. $ ./ccurl-digest RET…<snip>…ES9
  2733. BUWSNIAGAYCVUPGUJMWIIYHR9DQAPVHRKHXPJKB9BTCKPUXTFSNPXIBHCIIY
  2734. CJRAQJOGHXEYLXSJURUFS
  2735. $ ./ccurl-digest RET…<snip>…ES9
  2736. BUWSNIAGAYCVUPGUJMWIIYHR9DQAPVHRKHXPJKB9BTCKPUXTFSNPXIBHCIIY
  2737. CJRAQJOGHXEYLXSJURUFS
  2738. ```
  2739. **Other Collisions:** We also note that there are several trivial methods to generate
  2740. collisions for different message lengths in Curl, but these do not appear to impact the
  2741. security of IOTA. These can also be found in [our python example
  2742. code](https://github.com/mit-dci/tangled-curl/blob/master/curlexamples.py).
  2743. ### 7. Proof-of-Concept - IOTA Signature Forgery Examples
  2744. We provide two examples of a signature forgery attack we executed using valid IOTA
  2745. bundles. We provide instructions to replicate our signature forgery attacks
  2746. [here](https://github.com/mit-dci/tangled-curl). Colliding bundles given below.
  2747. #### Waste Money Attack
  2748. These two bundles demonstrate the signature forgery "waste money" attack described
  2749. earlier in the report. A signature on BURN_BUNDLE1 is also a valid signature for
  2750. BURN_BUNDLE2.
  2751. ```
  2752. var BURN_BUNDLE1 []string = []string{
  2753. "999…<snip>…BKE",
  2754. "T9E…<snip>…ROK",
  2755. "AZZ…<snip>…TCO",
  2756. "999…<snip>…CQR",
  2757. }
  2758. var BURN_BUNDLE2 []string = []string{
  2759. "999…<snip>…BKE",
  2760. "T9E…<snip>…ROK",
  2761. "AZZ…<snip>…TCO",
  2762. "999…<snip>…CQR",
  2763. }
  2764. ```
  2765. #### Steal Money Attack
  2766. These two bundles demonstrate the signature forgery "steal money" attack described
  2767. earlier in the report. A signature on STEAL_BUNDLE1 is also a valid signature for
  2768. STEAL_BUNDLE2. We also provide the bundle structure below.
  2769. <pre>
  2770. In STEAL_BUNDLE1:
  2771. - tx0 50000 spend to Alice
  2772. - tx1 -939211930 fund, Alice's sig
  2773. - tx2 0, Alice's sig
  2774. - tx3 100 to Eve
  2775. - tx4 0
  2776. - tx5 939161830 to Alice
  2777. - tx6 0
  2778. </pre>
  2779. <pre>
  2780. In STEAL_BUNDLE2:
  2781. - tx0 50000 spend to Alice
  2782. - tx1 -939211930 fund, Alice's sig
  2783. - tx2 0, Alice's sig
  2784. - tx3 129140263 to Eve
  2785. - tx4 0
  2786. - tx5 810021667 to Alice
  2787. - tx6 0
  2788. </pre>
  2789. ```
  2790. var STEAL_BUNDLE1 []string = []string{
  2791. "999…<snip>…BKE",
  2792. "NER…<snip>…ROK",
  2793. "AZZ…<snip>…TCO",
  2794. "999…<snip>…BKE",
  2795. "999…<snip>…BKE",
  2796. "999…<snip>…CQR",
  2797. "999…<snip>…BKE",
  2798. }
  2799. var STEAL_BUNDLE2 []string = []string{
  2800. "999…<snip>…BKE",
  2801. "NER…<snip>…ROK",
  2802. "AZZ…<snip>…TCO",
  2803. "999…<snip>…BKE",
  2804. "999…<snip>…BKE",
  2805. "999…<snip>…CQR",
  2806. "999…<snip>…BKE",
  2807. }
  2808. ```
  2809. Letter #74
  2810. Author: Sergey Ivancheglo
  2811. Date: 6th of September
  2812. Hi,
  2813. There are some corrections and suggestions to your paper:
  2814. > We have developed practical attacks on IOTA’s cryptographic hash function Curl
  2815. “Curl” should be replaced with “Curl-P”. “Cryptographic” should be removed because
  2816. Curl-P was designed to allow practical collisions.
  2817. > Exploiting these weaknesses in Curl, we break [the EU-CMA
  2818. security](http://www.cs.tau.ac.il/~canetti/f08-materials/scribe8.pdf) of the IOTA signature
  2819. scheme.
  2820. A better definition is required, the one you use allows us to break EU-CMA security after
  2821. just 10 queries to the signing oracle thus making your "attack" lose any value. The
  2822. definition also doesn’t take into account existence of distributed/decentralized ledgers.
  2823. > We present and demonstrate a practical attack whereby an attacker could exploit this
  2824. vulnerability in IOTA to steal funds from an IOTA user.
  2825. This is a wrong claim because the attacker can’t make a user sign an arbitrary hash.
  2826. > This report is the product of a responsible disclosure process.
  2827. This reminded me a question I wanted to ask some time ago: How did it happen that a
  2828. RESPONSIBLE disclosure led to 10s people knowing the details which were supposed
  2829. to be kept in secret?
  2830. > The cryptographic hash function Curl designed by the IOTA project has serious
  2831. weaknesses.
  2832. Should be changed to “The hash function Curl-P designed by the IOTA project has
  2833. properties used as protection against scam copycats.”
  2834. > We have demonstrated practical attacks which break Curl's collision resistance for
  2835. messages of different length and the same length.
  2836. “Different length” part should be removed, that was incorrect usage of Curl-P caused by
  2837. absence of complete documentation.
  2838. > We also demonstrate additional non-random behavior between certain classes of
  2839. related messages, namely messages which are bit rotations of other messages.
  2840. This part should be removed completely, that was incorrect usage of Curl-P caused by
  2841. absence of complete documentation.
  2842. > IOTA is still using Curl for transaction ID generation and for proof of work, we present
  2843. no practical attacks against these uses.
  2844. Are you planning to provide them in the nearest future? We’d like to reference them to
  2845. show that illegal copies of IOTA software are vulnerable to attacks.
  2846. > The signature scheme used by IOTA prior to recent updates relied on the collision
  2847. resistance of Curl for hashing messages as part of the signature algorithm.
  2848. This is a wrong statement, some our letters weren’t probably received by your team,
  2849. could we do some kind of a comparison to find the discrepancies?
  2850. > The attacks we developed against Curl lead to practical signature forgery attacks
  2851. against payments in IOTA.
  2852. “Practical” should be removed, probability of success should be mentioned. If I recall
  2853. correctly it’s something close to “one in a trillion”.
  2854. > We provide an example forged signature on a valid IOTA payment (before the fix was
  2855. deployed) at the of the report.
  2856. That example lacks explanation of the networking part of the attack scenario.
  2857. > In order to perform the upgrade, trading was [halted on
  2858. Bitfinex](https://www.bitfinex.com/posts/215) for [roughly 3
  2859. days](https://twitter.com/bitfinex/status/895915034102177792).
  2860. “Trading” should be replaced with “deposits/withdrawals”.
  2861. > The signature forgery vulnerability was fixed in [IOTA Reference Implementation (IRI)
  2862. version 1.3](https://github.com/iotaledger/iri/releases/tag/v1.3).
  2863. That upgrade was about other things. The migration to Kerl was included only because
  2864. it was planned more than a year ago that we would upgrade it if a cryptographer found
  2865. signs of the copy-protection mechanism before final Curl is ready.
  2866. > This disclosure included example collisions on messages of different lengths and an
  2867. example of non-pseudo-randomness.
  2868. Should be removed completely because, as we already wrote, the both examples were
  2869. based on an incorrect usage of Curl-P.
  2870. > We also outlined how we could use these collisions to break the EU-CMA security of
  2871. the IOTA signature scheme.
  2872. You used an incorrect definition of the EU-CMA security, this should, probably, be
  2873. emphasized.
  2874. > We sent the IOTA developers valid IOTA payments (bundles in IOTA terminology)
  2875. with different output addresses which hash to the same value under Curl as used in
  2876. IOTA signatures (prior to the Aug 7th fix). This showed that not only could we forge
  2877. signatures for some messages, but that these messages could be valid payments in
  2878. IOTA.
  2879. The payment was valid only syntaxically, without the networking part of the attack
  2880. scenario we can’t say that payment was valid.
  2881. > This showed that under certain circumstances an attacker could exploit this
  2882. cryptologic vulnerability in Curl to steal funds (prior to the Aug 7th fix).
  2883. Should be mentioned that probability of “certain circumstances” is negligible.
  2884. The above covers only the first 2 sections. Let’s first come to consensus on them and
  2885. then move to the remaining part.
  2886. PS: I know that David and Dominik also have some commentary that they will include
  2887. tomorrow, for example, the timeline regarding Ethan being approached by IOTA team in
  2888. May to do precisely this but declined due to working on Paragon Foundation. For us it is
  2889. very important that everything is transparent and correct in this.
  2890. Sergey
  2891. Letter #75
  2892. Author: Neha Narula
  2893. Date: 6th of August
  2894. Hi! A quick response:
  2895. On Wed, Sep 6, 2017 at 3:59 PM, Come-from-Beyond <come-frombeyond@mail.ru>
  2896. wrote:
  2897. Hi,
  2898. There are some corrections and suggestions to your paper:
  2899. > We have developed practical attacks on IOTA’s cryptographic hash function Curl
  2900. “Curl” should be replaced with “Curl-P”. “Cryptographic” should be removed because
  2901. Curl-P was designed to allow practical collisions.
  2902. You refer to it as "Curl" and as a cryptographic hash function in your own post:
  2903. https://blog.iota.org/upgrades-updates-d12145e381eb
  2904. > Exploiting these weaknesses in Curl, we break [the EU-CMA
  2905. security](http://www.cs.tau.ac.il/~canetti/f08-materials/scribe8.pdf) of the IOTA signature
  2906. scheme.
  2907. A better definition is required, the one you use allows us to break EU-CMA security after
  2908. just 10 queries to the signing oracle thus making your "attack" lose any value. The
  2909. definition also doesn’t take into account existence of distributed/decentralized ledgers.
  2910. I don't understand this statement.
  2911. > We present and demonstrate a practical attack whereby an attacker could exploit this
  2912. vulnerability in IOTA to steal funds from an IOTA user.
  2913. This is a wrong claim because the attacker can’t make a user sign an arbitrary hash.
  2914. I don't understand this statement.
  2915. > This report is the product of a responsible disclosure process.
  2916. This reminded me a question I wanted to ask some time ago: How did it happen that a
  2917. RESPONSIBLE disclosure led to 10s people knowing the details which were supposed
  2918. to be kept in secret?
  2919. Who are the 10s of people on our side? Our working group is the four people listed on
  2920. this report. In the past week, we have shared drafts of the report to get feedback, as
  2921. you have completed your updates. Everyone we shared with is under embargo.
  2922. > The cryptographic hash function Curl designed by the IOTA project has serious
  2923. weaknesses.
  2924. Should be changed to “The hash function Curl-P designed by the IOTA project has
  2925. properties used as protection against scam copycats.”
  2926. I do not agree with this statement. Curl was used for signatures.
  2927. > We have demonstrated practical attacks which break Curl's collision resistance for
  2928. messages of different length and the same length.
  2929. “Different length” part should be removed, that was incorrect usage of Curl-P caused by
  2930. absence of complete documentation.
  2931. We were using Curl as a hash function.
  2932. > We also demonstrate additional non-random behavior between certain classes of
  2933. related messages, namely messages which are bit rotations of other messages.
  2934. This part should be removed completely, that was incorrect usage of Curl-P caused by
  2935. absence of complete documentation.
  2936. We were using Curl as a hash function.
  2937. > IOTA is still using Curl for transaction ID generation and for proof of work, we present
  2938. no practical attacks against these uses.
  2939. Are you planning to provide them in the nearest future? We’d like to reference them to
  2940. show that illegal copies of IOTA software are vulnerable to attacks.
  2941. No plans at the moment. I do not know what "illegal copies of IOTA" are.
  2942. > The signature scheme used by IOTA prior to recent updates relied on the collision
  2943. resistance of Curl for hashing messages as part of the signature algorithm.
  2944. This is a wrong statement, some our letters weren’t probably received by your team,
  2945. could we do some kind of a comparison to find the discrepancies?
  2946. What is wrong about this?
  2947. > The attacks we developed against Curl lead to practical signature forgery attacks
  2948. against payments in IOTA.
  2949. “Practical” should be removed, probability of success should be mentioned. If I recall
  2950. correctly it’s something close to “one in a trillion”.
  2951. We were able to create collisions within a few minutes on commodity hardware. This is
  2952. "practical". We will make it clear that is what we mean when we say "practical".
  2953. > We provide an example forged signature on a valid IOTA payment (before the fix was
  2954. deployed) at the of the report.
  2955. That example lacks explanation of the networking part of the attack scenario.
  2956. This example is independent of networking. It is simply two colliding bundles.
  2957. > In order to perform the upgrade, trading was [halted on
  2958. Bitfinex](https://www.bitfinex.com/posts/215) for [roughly 3
  2959. days](https://twitter.com/bitfinex/status/895915034102177792).
  2960. “Trading” should be replaced with “deposits/withdrawals”.
  2961. I have no issue with this change.
  2962. > The signature forgery vulnerability was fixed in [IOTA Reference Implementation (IRI)
  2963. version 1.3](https://github.com/iotaledger/iri/releases/tag/v1.3).
  2964. That upgrade was about other things. The migration to Kerl was included only because
  2965. it was planned more than a year ago that we would upgrade it if a cryptographer found
  2966. signs of the copy-protection mechanism before final Curl is ready.
  2967. The statement still stands, the specific attack we found was fixed in that update.
  2968. > This disclosure included example collisions on messages of different lengths and an
  2969. example of non-pseudo-randomness.
  2970. Should be removed completely because, as we already wrote, the both examples were
  2971. based on an incorrect usage of Curl-P.
  2972. We think the examples are useful.
  2973. > We also outlined how we could use these collisions to break the EU-CMA security of
  2974. the IOTA signature scheme.
  2975. You used an incorrect definition of the EU-CMA security, this should, probably, be
  2976. emphasized.
  2977. We do not agree with this.
  2978. > We sent the IOTA developers valid IOTA payments (bundles in IOTA terminology)
  2979. with different output addresses which hash to the same value under Curl as used in
  2980. IOTA signatures (prior to the Aug 7th fix). This showed that not only could we forge
  2981. signatures for some messages, but that these messages could be valid payments in
  2982. IOTA.
  2983. The payment was valid only syntaxically, without the networking part of the attack
  2984. scenario we can’t say that payment was valid.
  2985. I will try to edit this to make it very clear that we do not know exactly what would have
  2986. happened had we submitted the transactions to the IOTA network, and we did not do
  2987. so.
  2988. > This showed that under certain circumstances an attacker could exploit this
  2989. cryptologic vulnerability in Curl to steal funds (prior to the Aug 7th fix).
  2990. Should be mentioned that probability of “certain circumstances” is negligible.
  2991. We do not agree with this. We think the probability is high enough for concern.
  2992. Letter #76
  2993. Author: David Sønstebø
  2994. Date: 7th of September
  2995. Hey Neha,
  2996. I was preparing a thorough response to your publication, then something almost
  2997. incomprehensible occurred.
  2998. We are beyond baffled and frankly shocked at the moment. We were just reached out to
  2999. by a CoinDesk journalist that Ethan contacted in an attempt to rush out this publication.
  3000. This may be the biggest scandal I have ever heard of from what has been portrayed as
  3001. a professional 'responsible disclosure'. Ethan is clearly in complete conflict of interest
  3002. and pushing this for his own gain, this is no longer about academic merits, but a
  3003. desperate attempt by Ethan to make money. We will use all resources to elucidate this
  3004. as publicly as possible if Ethan does not effective immediately contact all the people he
  3005. has been spreading this premature story to and retract all his statements.
  3006. Letter #77
  3007. Author: Neha Narula
  3008. Date: 7th of September
  3009. Hi,
  3010. The responsible disclosure time period is over; you fixed the vulnerability we found and
  3011. deployed the fix. Our original agreement specified that we were bound until August
  3012. 12th. It is quite well past that! But it is very important to us to hear what you think might
  3013. be mistakes in the report, so we can fix them.
  3014. I'm afraid I don't agree with you on the topic of conflict of interests. At any rate, I'm the
  3015. one who first contacted a journalist on this topic, so you should direct your ire towards
  3016. me, not Ethan.
  3017. Thanks,
  3018. Neha
  3019. Letter #78
  3020. Author: David Sønstebø
  3021. Date: 7th of September
  3022. Neha, are you sober?
  3023. The repeated bugs in your code lead to weeks of postponements, and you still have not
  3024. answered even half of our questions. This is the most unprofessional behavior I have
  3025. ever witnessed by an 'academic'. Who is your supervisor?
  3026. Letter #79
  3027. Author: Neha Narula
  3028. Date: 7th of September
  3029. Hi,
  3030. I think these personal attacks are unprofessional and unwarranted. I'm going to stop
  3031. responding now.
  3032. Thanks,
  3033. Neha
  3034. Letter #80
  3035. Author: David Sønstebø
  3036. Date: 7th of September
  3037. Neha, you rushed to the press with a preprint, as per your last communication with
  3038. Sergey just an hour ago there is still a ton of unresolved issues. What kind of academic
  3039. rushes to the press before peer review?
  3040. Letter #81
  3041. Author: Neha Narula
  3042. Date: 7th of September
  3043. Hi IOTA team,
  3044. We have been in working with you for over a month now developing this and answering
  3045. your questions, and you said that you deployed this fix a month ago. We will
  3046. take Sergey's comments under advisement. Tell us of any other factual issues you have
  3047. with the report, and we will take those under advisement as well. We will be
  3048. publishing tomorrow.
  3049. Thanks,
  3050. Neh
  3051. Letter #82
  3052. Author: Sergey Ivancheglo
  3053. Date: 7th of September
  3054. Hi Neha,
  3055. I think if your team fixes all issues in Ethan’s findings there will be nothing to publish left.
  3056. 1 day is not enough for you to extend the “attacks” to something possible in practice, so
  3057. let’s just continue our dispute in public.
  3058. I'm still expecting to get an explanation of how a RESPONSIBLE disclosure led to
  3059. numerous people outside of our teams knowing the details before the update was even
  3060. scheduled. This is especially important taking into account your own words:
  3061. > On August 5th, you will need to inform users to upgrade and change addresses. How
  3062. do you plan on messaging this? At this point people will start looking for vulnerabilities.
  3063. Personally, I just can't get if you were knowing from the very beginning that the
  3064. "vulnerability" found by Ethan wasn't critical or that your disclosure wasn't actually
  3065. responsible given how many independent people, most of whom are not cryptographers
  3066. or security researchers, has reached out to us about it (and that was only a part of those
  3067. who had known about Ethan's findings).
  3068. Sergey
  3069. Letter #83
  3070. Author: Sergey Ivancheglo
  3071. Date: 21st of October
  3072. Hi Ethan,
  3073. I can't get a single reply from you, looks like you put me on ignore on Twitter. I don't
  3074. blame you, sometimes I'm pretty annoying, I spend too much time with computers and
  3075. lack some skills required for proper interaction with humans. I'm writing this letter to
  3076. inform you that I'm going to contact Boston University administration to make some
  3077. things (related to your report on Curl-P) clear. I'm doing it via a lawyer, not personally.
  3078. I'm informing you now because I like transparency and feel that I shouldn't do that
  3079. behind your back.
  3080. No need to reply to this letter if you don't want to, of course.
  3081. Best regards,
  3082. Sergey
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement