ElGamal encryption

In cryptography, the ElGamal encryption system is an asymmetric key encryption algorithm for public-key cryptography which is based on the Diffie–Hellman key exchange. It was described by Taher Elgamal in 1985.[1] ElGamal encryption is used in the free GNU Privacy Guard software, recent versions of PGP, and other cryptosystems. The Digital Signature Algorithm (DSA) is a variant of the ElGamal signature scheme, which should not be confused with ElGamal encryption.

ElGamal encryption can be defined over any cyclic group , like multiplicative group of integers modulo n if and only if n is 1, 2, 4, pk or 2pk, where p is an odd prime and k > 0. Its security depends upon the difficulty of a certain problem in related to computing discrete logarithms.

The algorithm

The algorithm can be described as first performing a Diffie–Hellman key exchange to establish a shared secret , then using this as a one-time pad for encrypting the message. ElGamal encryption is performed in three phases: the key generation, the encryption, and the decryption. The first is purely key exchange, whereas the latter two mix key exchange computations with message computations.

Key generation

The first party, Alice, generates a key pair as follows:

  • Generate an efficient description of a cyclic group of order with generator . Let represent the identity element of .
    It is not necessary to come up with a group and generator for each new key. Indeed, one may expect a specific implementation of ElGamal to be hardcoded to use a specific group, or a group from a specific suite. The choice of group is mostly about how large keys you want to use.
  • Choose an integer randomly from .
  • Compute .
  • The public key consists of the values . Alice publishes this public key and retains as her private key, which must be kept secret.

Encryption

A second party, Bob, encrypts a message to Alice under her public key as follows:

  • Map the message to an element of using a reversible mapping function.
  • Choose an integer randomly from .
  • Compute . This is called the shared secret.
  • Compute .
  • Compute .
  • Bob sends the ciphertext to Alice.

Note that if one knows both the ciphertext and the plaintext , one can easily find the shared secret , since . Therefore, a new and hence a new is generated for every message to improve security. For this reason, is also called an ephemeral key.

Decryption

Alice decrypts a ciphertext with her private key as follows:

  • Compute . Since , , and thus it is the same shared secret that was used by Bob in encryption.
  • Compute , the inverse of in the group . This can be computed in one of several ways. If is a subgroup of a multiplicative group of integers modulo , where is prime, the modular multiplicative inverse can be computed using the extended Euclidean algorithm. An alternative is to compute as . This is the inverse of because of Lagrange's theorem, since .
  • Compute . This calculation produces the original message , because ; hence .
  • Map back to the plaintext message .

Practical use

Like most public key systems, the ElGamal cryptosystem is usually used as part of a hybrid cryptosystem, where the message itself is encrypted using a symmetric cryptosystem, and ElGamal is then used to encrypt only the symmetric key. This is because asymmetric cryptosystems like ElGamal are usually slower than symmetric ones for the same level of security, so it is faster to encrypt the message, which can be arbitrarily large, with a symmetric cipher, and then use ElGamal only to encrypt the symmetric key, which usually is quite small compared to the size of the message.

Security

The security of the ElGamal scheme depends on the properties of the underlying group as well as any padding scheme used on the messages. If the computational Diffie–Hellman assumption (CDH) holds in the underlying cyclic group , then the encryption function is one-way.[2]

If the decisional Diffie–Hellman assumption (DDH) holds in , then ElGamal achieves semantic security.[2][3] Semantic security is not implied by the computational Diffie–Hellman assumption alone. See Decisional Diffie–Hellman assumption for a discussion of groups where the assumption is believed to hold.

ElGamal encryption is unconditionally malleable, and therefore is not secure under chosen ciphertext attack. For example, given an encryption of some (possibly unknown) message , one can easily construct a valid encryption of the message .

To achieve chosen-ciphertext security, the scheme must be further modified, or an appropriate padding scheme must be used. Depending on the modification, the DDH assumption may or may not be necessary.

Other schemes related to ElGamal which achieve security against chosen ciphertext attacks have also been proposed. The Cramer–Shoup cryptosystem is secure under chosen ciphertext attack assuming DDH holds for . Its proof does not use the random oracle model. Another proposed scheme is DHIES,[4] whose proof requires an assumption that is stronger than the DDH assumption.

Efficiency

ElGamal encryption is probabilistic, meaning that a single plaintext can be encrypted to many possible ciphertexts, with the consequence that a general ElGamal encryption produces a 1:2 expansion in size from plaintext to ciphertext.

Encryption under ElGamal requires two exponentiations; however, these exponentiations are independent of the message and can be computed ahead of time if needed. Decryption requires one exponentiation and one computation of a group inverse, which can, however, be easily combined into just one exponentiation.

See also

Further reading

  • A. J. Menezes; P. C. van Oorschot; S. A. Vanstone. "Chapter 8.4 ElGamal public-key encryption" (PDF). Handbook of Applied Cryptography. CRC Press.
  • Dan Boneh (1998). "The Decision Diffie-Hellman problem". Algorithmic Number Theory. Lecture Notes in Computer Science. Vol. 1423. pp. 48–63. CiteSeerX 10.1.1.461.9971. doi:10.1007/BFb0054851. ISBN 978-3-540-64657-0.

References

  1. ^ Taher ElGamal (1985). "A Public-Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms" (PDF). IEEE Transactions on Information Theory. 31 (4): 469–472. CiteSeerX 10.1.1.476.4791. doi:10.1109/TIT.1985.1057074. S2CID 2973271. (conference version appeared in CRYPTO'84, pp. 10–18)
  2. ^ a b Mike Rosulek (2008-12-13). "Elgamal encryption scheme". University of Illinois at Urbana-Champaign. Archived from the original on 2016-07-22.
  3. ^ Tsiounis, Yiannis; Yung, Moti (2006-05-24). "On the security of ElGamal based encryption". Public Key Cryptography. Lecture Notes in Computer Science. Vol. 1431. pp. 117–134. doi:10.1007/BFb0054019. ISBN 978-3-540-69105-1.
  4. ^ Abdalla, Michel; Bellare, Mihir; Rogaway, Phillip (2001-01-01). "The Oracle Diffie-Hellman Assumptions and an Analysis of DHIES". Topics in Cryptology — CT-RSA 2001. Lecture Notes in Computer Science. Vol. 2020. pp. 143–158. doi:10.1007/3-540-45353-9_12. ISBN 978-3-540-41898-6.

Read other articles:

Military campaign during the American Civil War Price's Missouri ExpeditionPart of the American Civil WarThe Price Raid by Samuel J. ReaderOperational scopeStrategic offensiveLocationArkansas, Missouri, Kansas, Indian Territory, and TexasCommanded by Maj. Gen. Sterling PriceDateAugust 29 – December 2, 1864Executed byArmy of MissouriOutcomeUnion victory vtePrice's Missouri Expedition Fort Davidson Glasgow Sedalia 2nd Lexington Little Blue 2nd Independence Byram's Ford Westport Marais …

この項目には、一部のコンピュータや閲覧ソフトで表示できない文字が含まれています(詳細)。 数字の大字(だいじ)は、漢数字の一種。通常用いる単純な字形の漢数字(小字)の代わりに同じ音の別の漢字を用いるものである。 概要 壱万円日本銀行券(「壱」が大字) 弐千円日本銀行券(「弐」が大字) 漢数字には「一」「二」「三」と続く小字と、「壱」「弐」…

本條目存在以下問題,請協助改善本條目或在討論頁針對議題發表看法。 此條目需要补充更多来源。 (2017年12月19日)请协助補充多方面可靠来源以改善这篇条目,无法查证的内容可能會因為异议提出而被移除。致使用者:请搜索一下条目的标题(来源搜索:若望保祿二世 — 网页、新闻、书籍、学术、图像),以检查网络上是否存在该主题的更多可靠来源(判定指引)。 此…

Kenjiro TsudaKenjiro Tsuda, 2018Nama asal津田 健次郎Lahir11 Juni 1971 (umur 52)[1] Prefektur Osaka, Jepang[1]AlmamaterUniversitas MeijiPekerjaan Pemeran pengisi suara narator sutradara Tahun aktif1995–sekarangAgenANDSTIRTinggi170 cm (5 ft 7 in)[1]Situs webtsudaken.jp Kenjiro Tsuda (津田 健次郎code: ja is deprecated , Tsuda Kenjirō, lahir 11 Juni 1971) adalah seorang pemeran, pengisi suara, narator, dan sutradara asal Prefektur Os…

2020年夏季奥林匹克运动会波兰代表團波兰国旗IOC編碼POLNOC波蘭奧林匹克委員會網站olimpijski.pl(英文)(波兰文)2020年夏季奥林匹克运动会(東京)2021年7月23日至8月8日(受2019冠状病毒病疫情影响推迟,但仍保留原定名称)運動員206參賽項目24个大项旗手开幕式:帕维尔·科热尼奥夫斯基(游泳)和马娅·沃什乔夫斯卡(自行车)[1]闭幕式:卡罗利娜·纳亚(皮划艇)[2…

Kepolisian Bersenjata Rakyat Tiongkok中国人民武装警察部队Zhōngguó Rénmín Wǔzhuāng Jǐngchá BùduìLencana Kepolisian Bersenjata Rakyat (sejak 1 Agustus 2021)Aktif19 Juni 1982–sekarangNegara TiongkokCabang Korps Penjaga Internal PAP Korps Mobil PAP Korps Penjaga Pantai PAP Tipe unitGendarmeriPeranParamiliter, lembaga penegak hukumJumlah personel1,5 juta personelBagian dariKomisi Militer PusatMarkasBeijing, Distrik Haidian, TiongkokWarna seragamMerah, HijauSitus webchinamil…

Chicago L station For other 'L' stations on the Chicago Transit Authority named California, see California (disambiguation) § CTA stations. You can help expand this article with text translated from the corresponding article in French. (July 2015) Click [show] for important translation instructions. View a machine-translated version of the French article. Machine translation, like DeepL or Google Translate, is a useful starting point for translations, but translators must revise error…

State park in Washington (state), US Steamboat Rock State ParkLocation in the state of WashingtonShow map of Washington (state)Steamboat Rock State Park (the United States)Show map of the United StatesLocationGrant, Washington, United StatesCoordinates47°51′47″N 119°08′00″W / 47.86306°N 119.13333°W / 47.86306; -119.13333[1]Area3,522 acres (14.25 km2)Elevation1,975 ft (602 m)[1]Established1972[2]OperatorWashington State Pa…

  لمعانٍ أخرى، طالع سوبريور (توضيح). سوبريور     الإحداثيات 47°11′36″N 114°53′25″W / 47.193333333333°N 114.89027777778°W / 47.193333333333; -114.89027777778   [1] تاريخ التأسيس 1869  تقسيم إداري  البلد الولايات المتحدة[2]  التقسيم الأعلى مقاطعة مينيرال  عاصمة لـ مقاطعة ميني…

British politician The subject of this article is standing for re-election to the House of Commons of the United Kingdom on 4 July, and has not been an incumbent MP since Parliament was dissolved on 30 May. Some parts of this article may be out of date during this period. Please feel free to improve this article (but note that updates without valid and reliable references will be removed) or discuss changes on the talk page. Flick DrummondOfficial portrait, 2019Member of Parliament for…

County in Nebraska, United States County in NebraskaHamilton CountyCountyHamilton County courthouse in AuroraLocation within the U.S. state of NebraskaNebraska's location within the U.S.Coordinates: 40°53′N 98°01′W / 40.88°N 98.02°W / 40.88; -98.02Country United StatesState NebraskaFounded1867 (created)1870 (organized)Named forAlexander HamiltonSeatAuroraLargest cityAuroraArea • Total547 sq mi (1,420 km2) • Land544&…

The California Battalion (also called the first California Volunteer Militia and U.S. Mounted Rifles) was formed during the Mexican–American War (1846–1848) in present-day California, United States. It was led by U.S. Army Brevet Lieutenant Colonel John C. Frémont and composed of his cartographers, scouts and hunters and the California Volunteer Militia formed after the Bear Flag Revolt. The battalion's formation was officially authorized by Commodore Robert F. Stockton, commanding officer …

Newport News redirects here. For the shipyard, see Newport News Shipbuilding. For other uses, see Newport News (disambiguation). Independent city in Virginia, United StatesNewport News, VirginiaIndependent cityNewport News Victory Arch FlagSealInteractive map of Newport NewsNewport NewsShow map of VirginiaNewport NewsShow map of the United StatesCoordinates: 37°4′15″N 76°29′4″W / 37.07083°N 76.48444°W / 37.07083; -76.48444CountryUnited StatesStateVirginiaSettl…

Unitary authority area in Berkshire, England This article is about the local government district of Wokingham, formed in 1974 and given borough status in 2007. For the Borough of Wokingham before 1974 and the town within the borough of the same name, see Wokingham. This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Borough of Wokingham – …

يفتقر محتوى هذه المقالة إلى الاستشهاد بمصادر. فضلاً، ساهم في تطوير هذه المقالة من خلال إضافة مصادر موثوق بها. أي معلومات غير موثقة يمكن التشكيك بها وإزالتها. (ديسمبر 2018) الشارع المستقيممعلومات عامةالموقع دمشق، سورياالتقسيم الإداري دمشق البلد  سوريا الطول 1570مالإحداثيات 33…

Part of a series onForced labour and slavery Contemporary Child Labour Child soldiers Conscription Debt Forced marriage Bride buying Child marriage Wife selling Forced prostitution Human trafficking Peonage Penal labour Contemporary Africa 21st-century jihadism Sexual slavery Wage slavery Historical Antiquity Egypt Babylonia Greece Rome Medieval Europe Ancillae Black Sea slave trade Byzantine Empire Kholop Prague slave trade Serfs History In Russia Emancipation Thrall Genoese slave trade Venetia…

CooliePoster filmSutradaraManmohan DesaiPrayag RajProduserKetan DesaiDitulis olehSmt. Jeevanprabha M. DesaiKader KhanPrayag RajK.K. ShuklaPemeranAmitabh BachchanRishi KapoorRati AgnihotriKader KhanWaheeda RehmanPuneet IssarSatyendra KapoorPenata musikLaxmikant-PyarelalSinematograferPeter PereiraPenyuntingHrishikesh MukherjeeDistributorAasia Films Pvt. Ltd.M.K.D. Films CombineTanggal rilis14 November 1983Durasi167 menitNegaraIndiaBahasaHindi Coolie (bahasa Hindi: कुली, 'Porter')…

مدرسة الإمارات الدولية معلومات التأسيس 2005  الموقع الجغرافي إحداثيات 25°03′53″N 55°09′21″E / 25.0647°N 55.1559°E / 25.0647; 55.1559   المكان دبي  البلد الإمارات العربية المتحدة  إحصاءات الموقع الموقع الرسمي  تعديل مصدري - تعديل   مدرسة الإمارات الدولية هو نظام مدارس د…

River in New South Wales, AustraliaAllynAllyn River, surrounded by sub tropical rainforestLocation of the Allyn River mouth in New South WalesLocationCountryAustraliaStateNew South WalesRegionNSW North Coast (IBRA), HunterLGADungogTownEast GresfordPhysical characteristicsSourceAllyn Range, Barrington Tops • locationnear Careys Peak • coordinates32°21′42.9″S 151°31′55.668″E / 32.361917°S 151.53213000°E / -32.361917; 151.5321…

Chemical compound LemborexantClinical dataTrade namesDayvigoOther namesE-2006License data US DailyMed: Lemborexant Pregnancycategory AU: B3[1][2] Routes ofadministrationBy mouth[3]Drug classOrexin receptor antagonist; Hypnotic; SedativeATC codeN05CJ02 (WHO) Legal statusLegal status AU: S4 (Prescription only)[1] CA: ℞-only[4] US: Schedule IV[3] Pharmacokinetic dataBioavailabilityGood (≥87%)[5][…