Share to: share facebook share twitter share wa share telegram print page

Padding oracle attack

In cryptography, a padding oracle attack is an attack which uses the padding validation of a cryptographic message to decrypt the ciphertext. In cryptography, variable-length plaintext messages often have to be padded (expanded) to be compatible with the underlying cryptographic primitive. The attack relies on having a "padding oracle" who freely responds to queries about whether a message is correctly padded or not. The information could be directly given, or leaked through a side-channel.

The earliest well-known attack that uses a padding oracle is Bleichenbacher's attack of 1998, which attacks RSA with PKCS #1 v1.5 padding.[1] The term "padding oracle" appeared in literature in 2002,[2] after Serge Vaudenay's attack on the CBC mode decryption used within symmetric block ciphers.[3] Variants of both attacks continue to find success more than one decade after their original publication.[1][4][5]

Asymmetric cryptography

In 1998, Daniel Bleichenbacher published a seminal paper on what became known as Bleichenbacher's attack (also known as "million message attack"). The attack uses a padding oracle against RSA with PKCS #1 v1.5 padding, but it does not include the term. Later authors have classified his attack as a padding oracle attack.[1]

Manger (2001) reports an attack on the replacement for PKCS #1 v1.5 padding, PKCS #1 v2.0 "OAEP".[6]

Symmetric cryptography

In symmetric cryptography, the padding oracle attack can be applied to the CBC mode of operation. Leaked data on padding validity can allow attackers to decrypt (and sometimes encrypt) messages through the oracle using the oracle's key, without knowing the encryption key.

Compared to Bleichenbacher's attack on RSA with PKCS #1 v1.5, Vaudenay's attack on CBC is much more efficient.[1] Both attacks target cryptosystems commonly-used for the time: CBC is the original mode used in Secure Sockets Layer (SSL) and had continued to be supported in TLS.[4]

A number of mitigations have been performed to prevent the decryption software from acting as an oracle, but newer attacks based on timing have repeatedly revived this oracle. TLS 1.2 introduces a number of authenticated encryption with additional data modes that do not rely on CBC.[4]

Padding oracle attack on CBC encryption

The standard implementation of CBC decryption in block ciphers is to decrypt all ciphertext blocks, validate the padding, remove the PKCS7 padding, and return the message's plaintext. If the server returns an "invalid padding" error instead of a generic "decryption failed" error, the attacker can use the server as a padding oracle to decrypt (and sometimes encrypt) messages.

The mathematical formula for CBC decryption is

As depicted above, CBC decryption XORs each plaintext block with the previous block. As a result, a single-byte modification in block will make a corresponding change to a single byte in .

Suppose the attacker has two ciphertext blocks and wants to decrypt the second block to get plaintext . The attacker changes the last byte of (creating ) and sends to the server. The server then returns whether or not the padding of the last decrypted block () is correct (a valid PKCS#7 padding). If the padding is correct, the attacker now knows that the last byte of is , the last two bytes are 0x02, the last three bytes are 0x03, …, or the last eight bytes are 0x08. The attacker can modify the second-last byte (flip any bit) to ensure that the last byte is 0x01. (Alternatively, the attacker can flip earlier bytes and binary search for the position to identify the padding. For example, if modifying the third-last byte is correct, but modifying the second-last byte is incorrect, then the last two bytes are known to be 0x02, allowing both of them to be decrypted.) Therefore, the last byte of equals . If the padding is incorrect, the attacker can change the last byte of to the next possible value. At most, the attacker will need to make 256 attempts to find the last byte of , 255 attempts for every possible byte (256 possible, minus one by pigeonhole principle), plus one additional attempt to eliminate an ambiguous padding.[7]

After determining the last byte of , the attacker can use the same technique to obtain the second-to-last byte of . The attacker sets the last byte of to by setting the last byte of to . The attacker then uses the same approach described above, this time modifying the second-to-last byte until the padding is correct (0x02, 0x02).

If a block consists of 128 bits (AES, for example), which is 16 bytes, the attacker will obtain plaintext in no more than 256⋅16 = 4096 attempts. This is significantly faster than the attempts required to bruteforce a 128-bit key.

Encrypting messages with Padding oracle attack (CBC-R)

CBC-R[8] turns a decryption oracle into an encryption oracle, and is primarily demonstrated against padding oracles.

Using padding oracle attack CBC-R can craft an initialization vector and ciphertext block for any plaintext:

  • decrypt any ciphertext Pi = PODecrypt( Ci ) XOR Ci−1,
  • select previous cipherblock Cx−1 freely,
  • produce valid ciphertext/plaintext pair Cx-1 = Px XOR PODecrypt( Ci ).

To generate a ciphertext that is N blocks long, attacker must perform N numbers of padding oracle attacks. These attacks are chained together so that proper plaintext is constructed in reverse order, from end of message (CN) to beginning message (C0, IV). In each step, padding oracle attack is used to construct the IV to the previous chosen ciphertext.

The CBC-R attack will not work against an encryption scheme that authenticates ciphertext (using a message authentication code or similar) before decrypting.

Attacks using padding oracles

The original attack against CBC was published in 2002 by Serge Vaudenay.[3] Concrete instantiations of the attack were later realised against SSL[9] and IPSec.[10][11] It was also applied to several web frameworks, including JavaServer Faces, Ruby on Rails[12] and ASP.NET[13][14][15] as well as other software, such as the Steam gaming client.[16] In 2012 it was shown to be effective against PKCS 11 cryptographic tokens.[1]

While these earlier attacks were fixed by most TLS implementors following its public announcement, a new variant, the Lucky Thirteen attack, published in 2013, used a timing side-channel to re-open the vulnerability even in implementations that had previously been fixed. As of early 2014, the attack is no longer considered a threat in real-life operation, though it is still workable in theory (see signal-to-noise ratio) against a certain class of machines. As of 2015, the most active area of development for attacks upon cryptographic protocols used to secure Internet traffic are downgrade attack, such as Logjam[17] and Export RSA/FREAK[18] attacks, which trick clients into using less-secure cryptographic operations provided for compatibility with legacy clients when more secure ones are available. An attack called POODLE[19] (late 2014) combines both a downgrade attack (to SSL 3.0) with a padding oracle attack on the older, insecure protocol to enable compromise of the transmitted data. In May 2016 it has been revealed in CVE-2016-2107 that the fix against Lucky Thirteen in OpenSSL introduced another timing-based padding oracle.[20][21]

References

  1. ^ a b c d e Romain Bardou; Riccardo Focardi; Yusuke Kawamoto; Lorenzo Simionato; Graham Steel; Joe-Kai Tsay (2012). Efficient Padding Oracle Attacks on Cryptographic Hardware. Rr-7944 (report). INRIA. p. 19.
  2. ^ Black, John; Urtubia, Hector (2002). Side-Channel Attacks on Symmetric Encryption Schemes: The Case for Authenticated Encryption. USENET Security '02.
  3. ^ a b Serge Vaudenay (2002). Security Flaws Induced by CBC Padding Applications to SSL, IPSEC, WTLS... (PDF). EUROCRYPT 2002. Similar attack model was used by Bleichenbacher against PKCS#1 v1.5 [5] and by Manger against PKCS#1 v2.0 [13]. This paper shows that similar attacks are feasible in the symmetric key world.
  4. ^ a b c Sullivan, Nick (12 February 2016). "Padding oracles and the decline of CBC-mode cipher suites". The Cloudflare Blog.
  5. ^ Hanno Böck; Juraj Somorovsky; Craig Young. "ROBOT attack: Return Of Bleichenbacher's Oracle Threat". Retrieved 27 February 2018.
  6. ^ Manger, James (2001). "A Chosen Ciphertext Attack on RSA Optimal Asymmetric Encryption Padding (OAEP) as Standardized in PKCS #1 v2.0" (PDF). Telstra Research Laboratories.
  7. ^ Is the padding oracle attack deterministic
  8. ^ Juliano Rizzo; Thai Duong (25 May 2010). Practical Padding Oracle Attacks (PDF). USENIX WOOT 2010.
  9. ^ Brice Canvel; Alain Hiltgen; Serge Vaudenay; Martin Vuagnoux (2003), Password Interception in a SSL/TLS Channel (PDF).
  10. ^ Jean Paul Degabriele; Kenneth G. Paterson (2007), Attacking the IPsec Standards in Encryption-only Configurations (PDF), archived from the original on 19 December 2018, retrieved 25 September 2018.
  11. ^ Jean Paul Degabriele; Kenneth G. Paterson (2010), On the (In)Security of IPsec in MAC-then-Encrypt Configurations, CiteSeerX 10.1.1.185.1534.
  12. ^ Juliano Rizzo; Thai Duong (25 May 2010). Practical Padding Oracle Attacks (PDF). USENIX WOOT 2010.
  13. ^ Thai Duong; Juliano Rizzo (2011). Cryptography in the Web: The Case of Cryptographic Design Flaws in ASP.NET (PDF). IEEE Symposium on Security and Privacy 2011.
  14. ^ Dennis Fisher (13 September 2010). "'Padding Oracle' Crypto Attack Affects Millions of ASP.NET Apps". Threat Post. Archived from the original on 13 October 2010.
  15. ^ Vlad Azarkhin (19 September 2010). ""Padding Oracle" ASP.NET Vulnerability Explanation". Archived from the original on 23 October 2010. Retrieved 11 October 2010.
  16. ^ "Breaking Steam Client Cryptography". Steam Database. Retrieved 1 May 2016.
  17. ^ Matthew Green; Nadia Heninger; Paul Zimmerman; et al. (2015), Imperfect Forward Secrecy: How Diffie–Hellman Fails in Practice (PDF). For further information see https://www.weakdh.org Archived 22 December 2019 at the Wayback Machine.
  18. ^ Matthew Green (3 March 2015). "Attack of the week: FREAK (or 'factoring the NSA for fun and profit')".; see https://www.freakattack.com Archived 5 March 2015 at the Wayback Machine for more information.
  19. ^ Matthew Green (14 October 2014). "Attack of the week: POODLE".; for further information, see https://www.poodle.io
  20. ^ OpenSSL Security Advisory [3rd May 2016], 3 May 2016
  21. ^ Yet Another Padding Oracle in OpenSSL CBC Ciphersuites, Cloudflare, 4 May 2016
Read more information:

Một phần của loạt bài về Chính trịChính trị đảng phái Phổ chính trị Cánh tả Cực tảTrung gian thiên tả Trung gian Trung gian thiên tảTrung gian cấp tiếnTrung gian thiên hữu Cánh hữu Trung gian thiên hữuCực hữu Ý thức hệ/Cương lĩnh Vô trị Cộng sản Xã hội Dân chủ xã hội Tự do Tự do ý chí Cộng hòa Tiến bộ Nguyên hợp Dân chủ Dân túy Toàn cầu Quốc tế Môi trường Xanh Đường lối thứ ba …

التوسّعيّة[1] تعني توسِّعُ الحكومات والدول أراضيها أو قوتها أو ثروتها أو نفوذها من خلال النمو الاقتصادي أو القوة الناعمة أو العدوان العسكري من أجل التوسع والاستعمار. تستعمل الأناركية أو الدعوة إلى الاتحاد السياسي أو الوحدة الوطنية أحيانًا من أجل تبرير التوسعية وتشريعه

Astrolabio de al-Sahlî Anverso del astrolabio de al-Sahlî.Material latónAltura 33,50 cmAncho 24,20 cmProfundidad 24,20 cm[1]​Peso 1996 grRealización Fundición, grabadoPeríodo Arte islámicoCivilización Al-ÁndalusFecha 1067Ubicación actual Museo Arqueológico Nacional de MadridRegistro 50762[editar datos en Wikidata] El astrolabio de al-Sahlî es una pieza que forma parte del llamado arte islámico, y data de la época de la Taifa de Toledo, una de las taifas de Al-Ándal…

National governing body for volleyball in Scotland This article uses bare URLs, which are uninformative and vulnerable to link rot. Please consider converting them to full citations to ensure the article remains verifiable and maintains a consistent citation style. Several templates and tools are available to assist in formatting, such as reFill (documentation) and Citation bot (documentation). (August 2022) (Learn how and when to remove this template message) ‹ The template Infobox natio…

Bodyguard Ugal-ugalanSutradara Irham Acho Bahtiar Produser Dhamoo Punjabi Chand Parwez Servia Flaz Servia Gope T. Samtani Ditulis oleh Ferdy K PemeranSyahriniTamara BleszynskiBoris BokirMuhadkly AchoLoloxAnyun CadelMelayu Nicole HallRirin EkawatiPenata musikIndra QPerusahaanproduksiMD PicturesKharisma Starvision PlusRapi FilmsHOOQDistributorIflix OriginalsTanggal rilis5 Juli 2018Negara IndonesiaBahasa Indonesia PrekuelSecurity Ugal-ugalan Bodyguard Ugal-ugalan adalah film komedi Indon…

artikel ini perlu dirapikan agar memenuhi standar Wikipedia. Tidak ada alasan yang diberikan. Silakan kembangkan artikel ini semampu Anda. Merapikan artikel dapat dilakukan dengan wikifikasi atau membagi artikel ke paragraf-paragraf. Jika sudah dirapikan, silakan hapus templat ini. (Pelajari cara dan kapan saatnya untuk menghapus pesan templat ini) Dlingo Hanacaraka: ꦢ꧀ꦭꦶꦔTransliterasi: DlingaKapanewonPeta lokasi Kapanewon DlingoNegara IndonesiaProvinsiDaerah Istimewa YogyakartaKa…

1956 single by Kitty WellsSearching (For Someone Like You)Single by Kitty WellsB-sideI'd Rather Stay HomeReleased1956GenreCountryLabelDeccaSongwriter(s)Murphy Pee Wee Maddux Searching (For Someone Like You) is a song written by Pee Wee Maddux, sung by Kitty Wells, and released on the Decca label (catalog no. 9-29956). In July 1956, it peaked at No. 3 on Billboard's country and western juke box chart.[1] It spent 34 weeks on the charts and was also ranked No. 5 on Billboard's 1956…

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (يونيو 2019) بيوتر موس معلومات شخصية الميلاد 13 مايو 1949 (74 سنة)  بيدغوشتش  مواطنة بولندا  الحياة العملية المهنة ملحن[1]  اللغات البولندية  الجوائز  نيشان ا

FresteaJenis produkMinuman tehPemilikThe Coca-Cola CompanyCoca-Cola Europacific Partners IndonesiaPacific Refreshments Pte. Ltd.NegaraIndonesiaDiluncurkan2002Situs webFrestea Frestea adalah merek minuman teh siap minum yang diproduksi oleh PT Coca-Cola Bottling Indonesia. Diluncurkan pertama kali pada tahun 2002 sebagai pengganti Hi-C, hak merek ini dipegang oleh Pacific Refreshments Pte. Ltd., yang bermarkas di Singapura, merupakan divisi Asia Tenggara dari Beverage Partners Worldwide, yang mer…

American college football season 1891 VMI Keydets footballConferenceIndependentRecord3–0–1Head coachWalter Taylor (1st season)Seasons← 18731892 → 1891 Southern college football independents records vte Conf Overall Team W   L   T W   L   T Trinity (NC)   –   3 – 0 – 0 Wake Forest   –   1 – 0 – 0 VMI   –   3 – 0 – 1 Vanderbilt   –   3 – 1 …

UEFA Champions League 2003/04 Pokalsieger Portugal FC Porto (2. Titel) Beginn 16. Juli 2003 Finale 26. Mai 2004 Finalstadion Arena AufSchalke, Gelsenkirchen Mannschaften 32 (72 mit Qualifikationsrunden) Torschützenkönig Spanier Fernando Morientes (9) ← UEFA Champions League 2002/03 UEFA Champions League 2004/05 → Die Arena AufSchalke in Gelsenkirchen Die UEFA Champions League 2003/04 war die 12. Spielzeit des wichtigsten europäischen Wettbewerbs für Vereinsmannschaften im Fußball u…

Agence de Réhabilitation de la ville de Porto-NovoCadreSigle ARPNType Établissement publicSiège Porto-NovoPays  BéninOrganisationDirecteur Emmanuel ZossouSite web cadredevie.gouv.bj/structure/arpnmodifier - modifier le code - modifier Wikidata L'Agence de Réhabilitation de la ville de Porto-Novo, en abrégé ARPN, est un établissement public à caractères social, culturel et scientifique sous la tutelle du ministre en charge de l'urbanisme et de l'habitat, créé en 2015 par décret …

2018 video game 2018 video gameMonster Hunter: WorldCover art, featuring Rathalos.Developer(s)CapcomPublisher(s)CapcomDirector(s)Yuya TokudaProducer(s)Hironobu TakeshitaShingo IzumiKazunori InoueDesigner(s)Teruki EndoYugo TogawaProgrammer(s)Yuuki OoiKota FukasawaArtist(s)Kaname FujiokaComposer(s)Akihiko NaritaZhenlan KangSeriesMonster HunterEngineMT FrameworkPlatform(s)PlayStation 4Xbox OneWindowsReleasePlayStation 4, Xbox OneJanuary 26, 2018WindowsAugust 9, 2018Genre(s)Action role-playingMode(s…

Lent Lambang kebesaranLent Lokasi di Region Auvergne-Rhône-Alpes Lent Koordinat: 46°07′13″N 5°11′47″E / 46.1203°N 5.1964°E / 46.1203; 5.1964NegaraPrancisRegionAuvergne-Rhône-AlpesDepartemenAinArondisemenBourg-en-BresseKantonPéronnasAntarkomuneBourg-en-BressePemerintahan • Wali kota (2008–2014) Michel BuelletLuas • Land131,48 km2 (1,215 sq mi) • Populasi21.266 • Kepadatan Populasi20,40/km2 (1,0…

Щодо інших людей з таким самим іменем та прізвищем див. Князевич. Василь Михайлович Князевич Василь Михайлович КнязевичВасиль Князевич під час візиту в Тернопільську область (10–11.03.2016)12-й Міністр охорони здоров'я України 18 грудня 2007 — 11 березня 2010Президент Віктор Ющ…

A muso duro - Campioni di vitaPaeseItalia Anno2022 Formatofilm TV Generebiografico, drammatico, storico Durata106 min Lingua originaleitaliano Rapporto16:9 CreditiRegiaMarco Pontecorvo SoggettoPaolo Bianchini, Stefano Bussa e Valeria Doddi SceneggiaturaGrazia Giardiello, Roberto Jannone e Marco Pontecorvo Interpreti e personaggi Flavio Insinna: Antonio Maglio Paola Minaccioni: Tiziana Claudia Vismara: Maria Stella Calà Francesco Gheghi: Michele Matteo Bianchi: Giovanni De Righi Simone C…

Cổng thông tin Doraemon sửa Tổng quan Viết tắtCTT:DRMCTT:DORA Doraemon (ドラえもん, Doraemon?) (tên cũ là Đôrêmon) là một bộ truyện tranh Nhật Bản của tác giả Fujiko Fujio được sáng tác từ năm 1969 với mục đích ban đầu dành cho lứa tuổi thiếu nhi. Tác phẩm sau đó đã được chuyển thể thành các tập phim hoạt hình ngắn, dài cùng các thể loại khác như kịch, trò chơi điện tử. Bộ…

Self portrait (1872)James Abbott McNeill Whistler atau James Whistler (14 Juli 1834 – 17 Juli 1903) adalah seorang pelukis terkenal dari Massachusetts, Amerika Serikat. Sebagian besar karya lukisannya dihasilkan di Eropa. Pada tahun 1842 ia bersama keluarganya pindah ke St. Petersburg, Rusia, ketika ayahnya bekerja menjadi pekerja konstruksi rel kereta api. Whistler kembali ke Amerika Serikat pada tahun 1849 dan mencoba masuk ke akademi militer di West Point, tetapi ditolak. Lalu…

2009 Indian filmVilluTheatrical release posterDirected byPrabhu DevaWritten byAC MugilRebel Ravi(dialogue)Screenplay byPrabhu DevaStory byAC MugilRebel RaviBased onSoldier (Hindi)Produced byK. KarunamoorthyC. ArunpandianStarringVijayNayantharaCinematographyRavi VarmanEdited byKola BhaskarMusic byDevi Sri PrasadProductioncompanyAyngaran InternationalDistributed byAyngaran InternationalRelease date 12 January 2009 (2009-January-12) Running time152 minutesCountryIndiaLanguageTamil Vi…

2007 film by Sanjay Leela Bhansali SaawariyaTheatrical release posterDirected bySanjay Leela BhansaliWritten byPrakash KapadiaVibhu PuriBased onWhite Nightsby Fyodor DostoyevskyProduced bySanjay Leela BhansaliStarringRanbir KapoorSonam KapoorRani MukerjiSalman KhanZohra SehgalNarrated byRani MukerjiCinematographyRavi K. ChandranEdited byBela SehgalMusic byMonty SharmaProductioncompaniesColumbia Pictures[1]SPE Films India[1]SLB FilmsDistributed bySony Pictures Releasing Internatio…

Kembali kehalaman sebelumnya

Lokasi Pengunjung: 18.220.109.124