Monday 25 December 2017

एक बार पैड सिफर बाइनरी विकल्प


क्रिप्टोग्राफ़ी एक बार पैड एक वन टाइम पैड (ओटीपी) एकमात्र संभावित अटूट एन्क्रिप्शन विधि है। एक ओटीपी का उपयोग करके एन्क्रिप्ट किए गए सादा पाठ को एन्क्रिप्ट करने वाली कुंजी के बिना पुनर्प्राप्त नहीं किया जा सकता। हालांकि, कई प्रमुख स्थितियां हैं जो एक बार पैड साइफर के उपयोगकर्ता द्वारा पूरी की जानी चाहिए, या साइफर को समझौता किया जा सकता है। कुंजी को यादृच्छिक होना चाहिए और एक गैर-नियतात्मक, गैर-पुनरावर्ती प्रक्रिया द्वारा उत्पन्न होना चाहिए। कोई एल्गोरिथ्म द्वारा उत्पन्न कोई कुंजी काम नहीं करेगा ओटीपी की सुरक्षा कुंजी की यादृच्छिकता पर निर्भर करती है। दुर्भाग्य से, एक कुंजी की यादृच्छिकता साबित नहीं की जा सकती। कुंजी का पुन: उपयोग कभी नहीं किया जाना चाहिए। विभिन्न संदेशों को एन्क्रिप्ट करने के लिए एक ही कुंजी का उपयोग करें, चाहे कितना छोटा हो, साइफर का समझौता करें कुंजी दुश्मन के हाथों में नहीं पड़ती। यह स्पष्ट प्रतीत हो सकता है, लेकिन यह सिस्टम की कमजोरी को इंगित करता है जिसमें आपको पैड के पाठक को बड़ी मात्रा में डेटा संचारित करने में सक्षम होना चाहिए। आमतौर पर, एक बार पैड सिफर कुंजी को राजनयिक थैली के माध्यम से भेज दिया जाता है। एक ठेठ एक बार पैड सिस्टम इस तरह काम करती है: एक लंबी ताज़ा नई यादृच्छिक कुंजी उत्पन्न करें सीओआरएपीएरटेक्स्ट बनाने के लिए कुंजी के साथ सादे टेक्स्ट। सिफरटेक्स्ट को डिक्रिप्ट करने के लिए, मूल कुंजी के साथ एक्सओआर। इस प्रकार प्रस्तुत प्रणाली एक सममित और पारस्परिक सिफर है। अन्य फ़ंक्शंस (उदाहरण के अलावा, मॉड्यूलो एन) का उपयोग सीफ़रटेक्स्ट उपज के लिए कुंजी और साउंडटेक्स्ट को गठजोड़ करने के लिए किया जा सकता है, हालांकि परिणामस्वरूप सिस्टम पारस्परिक सिफर नहीं हो सकता है यदि कुंजी यादृच्छिक है और कभी भी फिर से उपयोग नहीं की जाती है, तो एक ओटीपी सटीक अटूट है उचित कुंजी का उपयोग करके किसी भी प्रकार की किसी भी संदेश को एक ही लंबाई के किसी भी संदेश को डिक्रिप्ट किया जा सकता है। इस प्रकार, वास्तविक मूल संदेश को सिफरटेक्टेक्स्ट अकेले से निर्धारित नहीं किया जा सकता है, क्योंकि सभी संभव सादाक्षेत्र समान रूप से होने की संभावना है। यह एकमात्र क्रिप्टोपसिस्टम है जिसके लिए इस तरह के सबूत ज्ञात हैं। ओटीपी लागू करने के लिए बेहद सरल है। 1 हालांकि, सीमाएं हैं कुंजी का पुन: उपयोग करें और सिस्टम अत्यंत कमजोर हो जाता है, इसे पेन्सिल और पेपर के साथ तोड़ा जा सकता है। चाबियाँ उत्पन्न करने के लिए कुछ एल्गोरिथ्म का उपयोग करके एक बार पैड बनाने का प्रयास करें और आपके पास एक-बार-पैड नहीं है, आपके पास स्ट्रीम सिफर है कुछ बहुत ही सुरक्षित स्ट्रीम सिफर हैं, लेकिन जो लोग एक बार के पैड से किसी को नहीं जानते शायद एक को डिज़ाइन करने में सक्षम नहीं हैं यह दुर्भाग्य से काफी कमजोर स्ट्रीम सिफर देखने के लिए आम है, जो कि अटूट एक बार पैड के रूप में विज्ञापित है। इसके अलावा, भले ही आपके पास एक अच्छी तरह से कार्यान्वित ओटीपी सिस्टम है और आपकी कुंजी सुरक्षित रखी गई है, एक हमलावर पर विचार करें जो एक संदेश के हिस्से के सादा पाठ को जानता है। वह तब चाबी के उस हिस्से को पुनर्प्राप्त कर सकते हैं और इसका उपयोग स्वयं के संदेश को एन्क्रिप्ट करने के लिए कर सकते हैं। अगर वह तुम्हारा के बजाय वह बचा सकता है, तो आप गहरी परेशानी में हैं। सबसे पहले, एक ओटीपी सादा टेक्स्ट के लिए चुना गया है: विकिपीडिया में पैडिंग (क्रिप्टोग्राफी) पर संबंधित जानकारी है उदाहरण दर्शाता है कि सादा टेक्स्ट हमेशा मुख्य सामग्री के समान लंबाई नहीं होता है इसे विधियों द्वारा नियंत्रित किया जा सकता है: एन्क्रिप्शन से पहले सादा पाठ में एक टर्मिनेटर जोड़ना, और यादृच्छिक बिट्स के साथ साइबर टेक्स्ट को समाप्त करना। लंबाई और एक प्रस्तावना टर्मिनेटर को प्रीपेड करने के लिए, और रेडियल बिट्स के साथ समाप्त होता है। ऐसे सिग्नलिंग सिस्टम (और संभवतः सादा टेक्स्ट एन्कोडिंग विधि) को डिज़ाइन किया जाना चाहिए ताकि ये टर्मिनेटर सादा टेक्स्ट के लिए गलत न हो। इस उदाहरण के लिए, इसलिए माना जाता है कि सादा पाठ में पहले से मौजूद अंतरापृष्ठान्तरण संकेत है। तेजी से लंबी सादा-विशिष्टता वाली जोड़ी लंबाई के लिए, पार-संबंध शून्य के करीब हो जाता है। एन्क्रिप्शन संपादित करें तेजी से लंबे सादेटेक्स्टेक्साफेरक्टेक्स्ट जोड़ी लंबाई के लिए, क्रॉस-सहसंबंध भी शून्य के करीब हो जाता है। डिक्रिप्शन संपादित करें एक चतुर पाठक यह देख सकता है कि डिक्रिप्टर को वास्तविक अभ्यास में सादा टेक्स्ट की लंबाई जानने की जरूरत है। यह साइप्रटेक्ट को बिटस्ट्रीम (जैसे प्रत्येक बिट के रूप में पढ़ा जाता है) के रूप में डिक्रिप्ट करके किया जाता है, और स्टैन्ड को देखकर, जब तक कि साउंड-टेक्सटाइल नियम के अंत तक सैंडटेक्स्ट के लिए स्वीकृत संकेतों से संतुष्ट नहीं होता है। हाथ से एक बार पैड बनाना एक पूर्ण अंग्रेजी भाषा स्क्रैबल टाइल सेट संपादित करें अन्य भाषाओं के लिए स्क्रैबल पत्र वितरण देखें। एक बार पैड मूल रूप से कंप्यूटर के उपयोग के बिना बनाया गया था और यह आज भी संभव है। प्रक्रिया थकाऊ हो सकती है, लेकिन अगर सही ढंग से किया जाता है और पैड केवल एक बार उपयोग किया जाता है, तो इसका परिणाम अटूट है। एक बार पैड बनाने के लिए दो घटकों की जरूरत है: परिणामस्वरूप, दो पंक्तियों को रिकॉर्ड करने के लिए यादृच्छिक रूप से पत्र उत्पन्न करने का तरीका। बाद में करने का पारंपरिक तरीका था w: टाइपराइटर और डब्ल्यू: कार्बन पेपर का उपयोग करना। कार्बन पेपर और डब्ल्यू: टाइपराइटर रिबन तब नष्ट हो जाएंगे क्योंकि अक्सर उनसे पैड डेटा पुनर्प्राप्त करना संभव होता है। जैसे टाइपराइटर कम हो गए हैं, यह भी हाथों को दो भागों में पांच के समूहों में बड़े करीने से लिखने के लिए स्वीकार्य है: कार्बन रहित कॉपी पेपर शीट, जिन्हें कार्यालय आपूर्ति स्टोर्स में खरीदा जा सकता है। प्रत्येक शीट को एक सीरियल नंबर या कुछ अन्य अद्वितीय अंकन दिया जा सकता है। ऐतिहासिक रूप से, मैनुअल एक बार पैड के लिए महत्वपूर्ण सामग्री को कागज के कई छोटे पृष्ठों के पैड के रूप में वितरित किया गया था। प्रत्येक छोटे पृष्ठ में आम तौर पर 5 अंक समूहों की एक श्रृंखला होती थी, प्रत्येक अंक को बेतरतीब ढंग से 0 से 9 तक चुना गया था। 2 3 4 5 6 7 8 9 एक-बार पैड सेट में दो समान पैड होते हैं। कुछ लेखकों ने दो दो समान मूलताओं का उल्लेख किया है, जो इस बात पर बल देने के लिए कि कोई भी प्रतियां महत्वपूर्ण सामग्री से नहीं बननी चाहिए। 10 पारंपरिक रूप से दो-तरफा संचार के लिए दो पैड सेट (कुल 4 पैड) की आवश्यकता होती है: एक व्यक्ति को एक सेट का पैड और दूसरे सेट का आउट पैड मिलता है। 11 प्रत्येक छोटे पृष्ठ में आम तौर पर 5 यादृच्छिक दशमलव अंकों के 50 समूह होते हैं। 9, एक सामान्य संदेश के लिए पर्याप्त, और पांच अंकों की एक अद्वितीय पृष्ठ संख्या। 11 12 एक रूपांतरण सारणी का उपयोग सादा पाठ के अक्षरों को संख्याओं में परिवर्तित करने के लिए किया जाता है, और डीकोड किए गए संदेशों की संख्या को वापस अक्षरों में परिवर्तित किया जाता है। 5 शायद सबसे आसान रूपांतरण तालिका A01, B01 है Z26, लेकिन ऐतिहासिक रूप से कुछ तरह के चेकरबोर्ड का इस्तेमाल आमतौर पर सीटी -37 सी, 13 सीटी -37 व सीटी -46, 14 आदि के लिए किया जाता था। 15 एक बार पैड के लिए महत्वपूर्ण सामग्री को कभी-कभी 5 यादृच्छिकों के 50 समूह के रूप में लिखा जाता था पत्र एज़ 12 16 एक समय के पैड सिस्टम सहित क्रिप्टोग्राफिक मशीनों के लिए महत्वपूर्ण सामग्री को अक्सर लंबे, संकीर्ण काग़ज़ टेप पर बाइनरी कोड में छिद्रित किया गया था - एक बार टेप ओटीटी 12 17 10 अक्षर टाइल्स संपादित करें रोमन वर्णमाला में यादृच्छिक अक्षरों को उत्पन्न करने का सबसे आसान तरीका है 26 वस्तुओं को प्रत्येक वस्तु पर चिह्नित वर्णमाला के एक अलग पत्र के साथ प्राप्त करना है। खेल डब्ल्यू से टाइल: स्क्रैबल का उपयोग किया जा सकता है, जब तक कि केवल प्रत्येक अक्षर का चयन किया जाता है। नाम आकर्षण कंगन बनाने के लिए किट एक और संभावना है। कोई भी मार्किंग कलम के साथ 26 अन्यथा समान सिक्के वाले अक्षर लिख सकता है। वस्तुओं को एक बॉक्स या कप में रखा जाता है और सख्ती से हिल जाता है, फिर एक ऑब्जेक्ट वापस ले लिया जाता है और इसका अक्षर रिकॉर्ड होता है। ऑब्जेक्ट को बॉक्स में लौटा दिया जाता है और प्रक्रिया को दोहराया जाता है। 10-पक्षीय पासा संपादित करें एक बार पैड बनाने का एक अन्य तरीका है w: दस-साइड पासा। एक बार में कई दस-पक्षीय पासा को रोल करके और दशमलव अंकों के एक समूह को दर्ज करके प्रत्येक यादृच्छिक संख्या समूहों को उत्पन्न कर सकता है - प्रत्येक मरने के लिए एक दशमलव अंक - प्रत्येक रोल के लिए 11 यह विधि स्क्रैबल टाइलों की तुलना में रैंडम कोड समूहों को बहुत तेज़ बनाता है। सादा टेक्स्ट संदेश अंकीय मानों में ए 01, बी 02 और इसी तरह बदल जाता है। परिणामी संख्यात्मक मानों को गैर-ले जाने के अलावा के उपयोग से एक बार पैड से अंक जोड़कर एन्क्रिप्ट किया जाता है। एक तो या तो संख्यात्मक समूहों को संचारित कर सकता है या फिर संख्याओं को वापस अक्षरों में परिवर्तित करने और उस परिणाम को प्रेषित करने के लिए स्ट्रैडलिंग चेकरबोर्ड का उपयोग कर सकता है। 6-पक्षीय पासा संपादित करें एक बार पैड बनाने का एक अन्य तरीका 6-पक्षीय पासा का उपयोग करना है 18 6-पक्षीय पासा का उपयोग करके यादृच्छिक दशमलव अंक (एक पारंपरिक दशमलव एक बार पैड बनाने के लिए) उत्पन्न करना संभव है। 11 यदि संदेश को दो अंकों के आधार -6 संख्या में परिवर्तित किया जाता है, तो साधारण छह-पक्षीय पासा को एक समय पैड में यादृच्छिक अंक उत्पन्न करने के लिए इस्तेमाल किया जा सकता है। पैड में अंकों को सादा पाठ संदेश (फिर बिना ले जाने के) में अंकों के लिए मॉड्यूल -6 जोड़ा जाएगा, और सिफरटेक्स्ट से डिक्रिप्ट के लिए मॉड्यूल 6 को घटाया जाएगा। उदाहरण के लिए: संदेशों को आधार -6 में कनवर्ट करने के लिए तालिका फ़ाइलें एन्क्रिप्ट करने के लिए एक सुरक्षित विधि की आवश्यकता है, जब तक आप इसकी देखभाल करते हैं, तब तक इसे त्वरित, आसान और अटूट होना चाहते हैं यह आपके लिए उपकरण है तकनीक और उपकरणों के बारे में जानकारी के लिए, मेरा सुझाव है कि आप अनब्रेकेबल एन्क्रिप्शन पर एक बार पैड का उपयोग करें (अटूट)। मेरे पास ये उपकरण हैं जिन्हें वहां डिज़ाइन किए गए हैं, लेकिन डॉस में मेरा काम है और आवश्यकता नहीं है। यदि आपके पास है, तो मैं सुझाव देता हूं कि मेरे टूल्स का उपयोग न करें और अनब्रेबल्स का उपयोग करें। कम से कम अनब्रेबल्स पैडगेन कार्यक्रम का उपयोग करें - मुझे पूरा यकीन है कि यह मेरी याददाश्त से बेहतर यादृच्छिक संख्या उत्पन्न करता है ये उपकरण लिनक्स पर भी काम करते हैं, मेरे जैसे लोगों के लिए एक बार पैड जेनरेट करना अनब्रेकेबल साइट की तरह, आप निम्न सिंटैक्स का उपयोग करते हैं: पैडगेन पैडफाइलनाम पैडफाइलसेज़ यादृच्छिक संख्या जनरेटर का उपयोग करने के बजाय और अपने स्वयं के प्रोग्राम को संकलित करने के बजाय, आप इनपुट फ़ाइलों से एक पैड फ़ाइल जनरेट कर सकते हैं। इनपुट फ़ाइलों से यादृच्छिक डेटा के लिए अच्छे उम्मीदवारों को अभिलेखागार, वीडियो और ऑडियो फ़ाइलें, बड़ी.jpg फ़ाइलें, निष्पादन योग्य प्रोग्राम और डेटा के अन्य बाइनरी स्रोत संकुचित किए जाते हैं। हालांकि, यदि आप चाहें तो आप पाठ फ़ाइलों का उपयोग कर सकते हैं - लेकिन यह सुझाव नहीं दिया गया है। इनपुट फ़ाइलों से यादृच्छिक पैड जेनरेट करने के लिए, पैडफ़ाइल प्रोग्राम का उपयोग करें: padfile padfilename inputfile1 inputfile2 inputfile3। आपको एक से अधिक इनपुट फ़ाइल निर्दिष्ट करने की आवश्यकता नहीं है, लेकिन आपको (आपके फाइल नाम के आसपास और प्रतीकों नहीं) करने की अनुमति है। पैडफ़ाइल एक पैड फ़ाइल उत्पन्न करेगा जो इनपुट फ़ाइलों के आकार के आधे से थोड़ा छोटा है योजना तदनुसार। यह पैड फ़ाइल होना चाहिए जिसे आप एन्क्रिप्ट करना चाहते हैं, लेकिन इन टूल्स के लिए 100 आवश्यक नहीं है। एन्क्रिप्ट करना और डिक्रिप्टिंग करना यह उपकरण अनब्रेकेबल साइट पर एक जैसा है, लेकिन मैंने इसके लिए कुछ पैरामीटर बनाने का निर्णय लिया। पैडजेन विकल्प इनपुटफ़ाइल पैडफ़ाइल आउटपुटफ़ाइल विकल्प: - s बाइट निर्दिष्ट बाइट-एल पर पैडफ़ाइल का उपयोग करना प्रारंभ करें डेटा से बाहर होने पर पैडफ़ाइल लूप करें I पिछली बार पैडफ़ाइल-आर में बाइट दिखाएं पैडफ़ाइल - x अंक में यादृच्छिक बाइट पर शुरू होता है संख्या (0 से 255) के साथ XOR सब कुछ - I इन विकल्पों में से बहुत बढ़ने - x जब मैं इन विकल्पों में से एक बहुत बुरा आईडीईए है, लेकिन मैं उन्हें शामिल किया क्योंकि वे खिलौने के लिए मजेदार थे .. - s बाइट यह निर्दिष्ट बाइट पर पैडफ़ाइल का उपयोग शुरू कर देगा। यह अच्छा है अगर आप किसी को बड़े पैडफ़ाइल भेजते हैं, तो आप छोटे एन्क्रिप्टेड फाइलों को आगे पीछे भेजना चाहते हैं। आप अपने द्वारा भेजे जाने वाली प्रत्येक फ़ाइल के लिए पैडफ़ाइल के एक अनुभाग का उपयोग कर सकते हैं। - लाप पैडफ़ाइल लूप करें जब आप इसका उपयोग करते हैं आम तौर पर, पैडक्ज़ोर प्रोग्राम चलना बंद हो जाएगा यदि आप एक फ़ाइल को एन्कोड करने के लिए बाइट्स से बाहर चलाते हैं। लूपिंग आपको एक 10 मेग फाइल एन्क्रिप्ट करने के लिए एक 1 मेग फाइल का उपयोग करने देगी, लेकिन यह करना सुरक्षा के लिए खराब है। यदि आप अल्ट्रा-पारानोइड हैं, तो इसका इस्तेमाल न करें। यदि आप सिर्फ एक बड़ी फ़ाइल को छिपी आँखों (माता-पिता, सहकर्मियों, बच्चों) से छिपाने की कोशिश कर रहे हैं, तो आप किसी भी प्रकार की हटाने योग्य मीडिया पर अपनी चाबियाँ छू सकते हैं और छोटी कुंजी वाली फ़ाइलों को एन्क्रिप्ट कर सकते हैं और इसके माध्यम से पाशन रख सकते हैं। - बी एन्क्रिप्शन डिक्शनरी में उपयोग किए जाने वाले अंतिम बाइट को बताता है। पूरी तरह से पागल करने के लिए, आप उपयोग करते हुए पिछले बाइट से शुरू करने के लिए - s का उपयोग करेंगे 1. - r एक पैडफाइल में एक यादृच्छिक बाइट पर प्रारंभ करें। नीचे काल्पनिक विचार अनुभाग देखें। - x अंक एक और स्थिर xor के साथ परिणाम फिर से एन्क्रिप्ट नीचे काल्पनिक विचार अनुभाग देखें। - i जब आप कुंजी फ़ाइल के माध्यम से लूप हर बार - x मान बदलें। नीचे काल्पनिक विचार अनुभाग देखें। यह उदाहरण अनब्रेकेबल पर एक के समान बनाया गया है, लेकिन मेरे टूल के लिए padgen mypad. bin 200000 padxor otp. cs mypad. bin otp. cs. enc padxor otp. cs. enc mypad. bin otp. cs. dec या, यदि आप एक बड़ी प्री-जनरेटेड कुंजी का उपयोग करना चाहते हैं, तो बीच में से शुरू करें फ़ाइल, और बाइट प्राप्त करें जिसे यह एन्कोडेड फ़ाइल में आखिरी बार इस्तेमाल किया गया था, जैसे कुछ का उपयोग करें: पैडक्ज़ोर - एस 12047-बी ओटीपी सीएस मायपैड. बीबी ओटीपी.cs. enc पैडक्सोर - एस 12047-बी ओटीपी सीएस मायपैड. बीबी ओटीपी.ccs. enc एक बार पैड को सुरक्षित हटाना उपकरण पोंछे केवल यादृच्छिक-ईश डेटा को फ़ाइल पर और अधिक से अधिक और अधिक लिखता है। यह फ़ाइल सिस्टम के आधार पर काम नहीं कर सकता है - कुछ फाइल सिस्टम जर्नल किए गए हैं, इसलिए पुरानी डेटा वास्तव में डिस्क पर अधिलेखित नहीं है। हालांकि, डॉस के लिए, यह ठीक काम करेगा। वैकल्पिक पैड जनरेशन के बाद से padgen रैंड () फ़ंक्शन का उपयोग करता है, और यह यादृच्छिक डेटा के लिए एक अच्छा स्रोत नहीं साबित हुआ है, आप प्रोग्राम को संपादित करना और एक अलग यादृच्छिक संख्या जनरेटर का उपयोग करना चाह सकते हैं यदि आप उपयोग करते हैं, तो मैं अनब्रेबल्स साइट से पैडगन कार्यक्रम का सुझाव दूंगा। यदि आप न न देते हैं, तो एक यादृच्छिक एक बार पैड प्राप्त करने के कई अन्य तरीके हैं, जैसे प्रोग्राम जो कि एक टाइम पैड साइट पर है (लिंक अनुभाग देखें)। यदि आप लिनक्स का उपयोग कर रहे हैं, तो आप सिर्फ 1 मेग फ़ाइल बनाने के लिए डीडी का उपयोग कर सकते हैं (1024 बाइइट्स प्रति रीड 1024 वाचें): dd ifdevrandom ofmypad. bin bs1024 count1024 अन्य उपकरण और वेब साइट्स हैं जो आपको सांख्यिकीय रूप से यादृच्छिक डेटा देते हैं। यह सुनिश्चित करने के लिए कि आप अपनी कुंजी फ़ाइल का उपयोग कर सुरक्षित महसूस कर रहे हैं, आप padtest प्रोग्राम का उपयोग करके देख सकते हैं कि डेटा कितना यादृच्छिक है वास्तव में एक बार पैड कार्यक्रम (लिंक अनुभाग देखें) से इस कार्यक्रम की हिम्मत वास्तव में है। इसमें केवल सांख्यिकीय परीक्षण शामिल होता है कि ओटीपी.c कार्यक्रम में शामिल है - शेष सामान नहीं ध्यान रखें कि कोई प्रोग्राम कभी भी यह सत्यापित नहीं कर सकता कि डेटा यादृच्छिक है - यह केवल कुछ चीजों का परीक्षण कर सकता है जो गैर-यादृच्छिकता दर्शाती हैं इसके अलावा, पैडटेस्ट में परीक्षण सर्वोत्तम नहीं हैं - वे सिर्फ थोड़े से परीक्षण कर रहे हैं एक बेहतर परीक्षक ent है, लिंक अनुभाग में उपलब्ध है। यदि आप पैडजेन में रैंड () से यादृच्छिक संख्या पीढ़ी के फ़ंक्शन को बदलने का फैसला नहीं करते हैं, तो आप कमजोर हो सकते हैं। यदि कोई व्यक्ति विशेष उपकरण का उपयोग करता है जो आपकी चाबी ढूंढने के लिए डिज़ाइन किए गए हैं, तो आप परेशानी में हैं। यदि क्रैकर फ़ाइल शीर्ष लेख से कुंजी के पहले चार बाइट्स को समझ सकते हैं, तो srand बीज findpad के साथ मिल सकता है। इसके बाद, यदि आप कुंजी फ़ाइल की लंबाई जानते हैं, तो पैडसी आपके निर्दिष्ट बीज के साथ पैड बनायेगा। सुरक्षा के लिए अच्छा नहीं है, लेकिन सरल सुरक्षा के लिए अच्छा है कि आप से पुनर्प्राप्त कर सकते हैं पैडफ़ाइल पैडजेन की तुलना में बेहतर समाधान है हेक, पैड फ़ाइलों की सैकड़ों जेनरेट करते हैं और एक अच्छी पैड फ़ाइल बनाने के लिए उन्हें एक साथ पैडक्ज़ोर करते हैं। यदि आप दो यादृच्छिक डेटा स्रोतों को देखते हैं, तो परिणाम बेतरतीब डेटा होगा जो सबसे अच्छा स्रोत के रूप में अच्छा है। इसलिए, यदि आपके पास कई अलग-अलग प्रोग्राम पैड फ़ाइलें हैं और आप उन्हें एक साथ जोड़ते हैं, तो परिणामी फ़ाइल की ताकत, बिट के लिए बिट के रूप में होगी, जो डेटा का सबसे अच्छा स्रोत है। कायरता विचार यह अच्छा सुरक्षा नहीं है इन चीजों को एक यादृच्छिक आगंतुक द्वारा असंभव डेटा का पुनर्प्राप्ति करने के लिए लागू किया गया था, लेकिन एनएसए हम यहाँ क्या करते हैं पर हँसेंगे। एक ऐसी स्थिति है जहां हमें एक कुंजी के साथ एन्कोडेड ज़िप फ़ाइल की आवश्यकता होती है। कुंजी को परिवर्तित करने में असमर्थ है, और ज़िप फ़ाइल से छोटा होगा, इस प्रकार हमें कुंजी फ़ाइल के माध्यम से - l को लूप का उपयोग करने की आवश्यकता है। यह केवल आकस्मिक दृश्य से इसे बनाए रखने के लिए ठीक काम करता है और कुंजी फ़ाइल के आकार के कारण किसी भी हैकर समस्याओं को दे सकता है और हम एक ज़िप फ़ाइल को डीकोड करने का प्रयास कर रहे हैं। हालांकि, अगर चाबी लीक हो गई थी, तो ज़िप संग्रह को डीकोड करने के लिए यह तुच्छ था, इसलिए - आर का उपयोग करके, यह थोड़ा कठिन बना दिया गया है ज़िप फ़ाइल को अब कुंजी के साथ एन्क्रिप्ट किया गया है, लेकिन एक मिलियन शुरुआती अंक में से एक में। यह संभवतः हैकर को थोड़ा सा परेशानी दे सकता है। डाउनगेड (और वह हिस्सा जो महत्वपूर्ण के साथ ज़िप फ़ाइल की वसूली करता है) यह है कि फाइल की शुरुआत में ज़िप फ़ाइलों के पास 4-बाइट हैडर है हैकर केवल 4 लाख बाइट हेडर के साथ हर जगह शुरूआत कर सकता है, जिनके पास सही शीर्षक है, और उन लोगों को मैन्युअल रूप से परीक्षण करें। इसलिए, कुंजी में संभव प्रारंभिक स्थानों की संख्या शायद कुछ ही सेकेंड में decoding में 10 हो सकती है। तो, अब - x और शायद - i विकल्प का उपयोग करके, और - x के लिए एक यादृच्छिक संख्या का उपयोग करके (पैडक्ज़ोर में कोडित नहीं), फ़ाइल में कोई स्थान अब एक संभावित प्रारंभिक बिंदु हो सकता है हैकर को एक्स उत्पन्न करना होगा और अगले तीन बाइट्स बनाम प्रयास करना होगा। आखिरकार, व्यक्ति को- x कुंजियों के साथ 30-50 संभावित शुरुआती बिंदु मिलेंगे, और फाइल में अपना तरीका फिर से हैक करने में सक्षम होंगे। क्योंकि अस्पष्टता के माध्यम से सुरक्षा असली सुरक्षा नहीं है, हमने तय किया है कि - x, - i, और - r विकल्प हमारे उद्देश्यों के लिए उपयोगी नहीं होंगे। इस प्रकार, उनके साथ विकास को रोक दिया गया, लेकिन मैंने उन्हें प्रोग्राम में छोड़ दिया, सिर्फ इसलिए कि आप उनका उपयोग करना चाहते थे। padxor. zip में स्रोत कोड होता है जो कई प्लेटफार्मों पर संकलित करता है, और इसमें डॉस निष्पादनयोग्य शामिल हैं। एक-बार पैड वन-टाइम पैड (ओटीपी), जिसे वर्नाम-साइफर या सही सिफर भी कहा जाता है, एक क्रिप्टो एल्गोरिदम है जहां सादा टेक्स्ट मिलाया जाता है एक यादृच्छिक कुंजी यह केवल मौजूदा गणितीय अटूट एन्क्रिप्शन है WW2 के दौरान विशेष ऑपरेशन टीमों और प्रतिरोध समूहों द्वारा इस्तेमाल किया जाता है, जो शीत युद्ध और उससे आगे के दौरान खुफिया एजेंसियों और उनके जासूसों के साथ लोकप्रिय है, कई दशकों तक दुनिया भर में राजनयिक और सैन्य संदेश ट्रैफ़िक की रक्षा, एक बार पैड ने अभी तक एक प्रतिष्ठा प्राप्त की है एक पूर्ण सुरक्षा वाली ठोस एन्क्रिप्शन प्रणाली जो आज के आधुनिक क्रिप्टो एल्गोरिदम द्वारा बेमिसाल है। भविष्य में जो भी तकनीकी प्रगति आ सकती है, एक बार पैड एन्क्रिप्शन है, और रहेंगे, एकमात्र सचमुच अटूट प्रणाली जो वास्तविक दीर्घकालिक संदेश गोपनीयता प्रदान करती है अगर कुछ महत्वपूर्ण नियमों का पालन किया जाता है तो हम केवल एक बार पैड के बारे में बात कर सकते हैं। यदि ये नियम सही तरीके से लागू होते हैं, तो एक बार पैड को अटूट साबित किया जा सकता है (क्लाउड शैनन को देखें, सूचना संचारविज्ञान सिद्धांत)। यहां तक ​​कि अनंत कम्प्यूटेशनल शक्ति और अनंत समय एक बार पैड एन्क्रिप्शन को तोड़ नहीं सकते, क्योंकि यह गणितीय रूप से असंभव है। हालांकि, अगर इन नियमों में से केवल एक को अवहेलना नहीं किया जाता है, तो सिफर अब अटूट नहीं है। कुंजी कम से कम जब तक संदेश या डेटा एन्क्रिप्टेड होना चाहिए। कुंजी वास्तव में यादृच्छिक (एक साधारण कंप्यूटर फ़ंक्शन द्वारा उत्पन्न नहीं होती है या ऐसी) कुंजी और सादा टेक्स्ट मॉड्यूलो 10 (अंक), मॉड्यूल 26 (अक्षरों) या मॉड्यूलो 2 (बाइनरी) की गणना होती है प्रत्येक कुंजी का उपयोग केवल एक बार होता है, और दोनों प्रेषक और रिसीवर उपयोग के बाद उनकी कुंजी को नष्ट कर देना चाहिए केवल चाबी की दो प्रतियां होनी चाहिए: एक प्रेषक के लिए और एक रिसीवर के लिए (कई रिसीवर के लिए कुछ अपवाद मौजूद हैं) महत्वपूर्ण नोट: एक बार पैड या एक बार एन्क्रिप्शन को एक-बार कुंजी के साथ भ्रमित नहीं किया जाता है ( ओटीके) या एक-बार पासवर्ड (कभी-कभी भी ओटीपी के रूप में चिह्नित)। इस तरह के एक-समय की चाबियाँ, आकार में सीमित हैं, केवल एक ही एन्क्रिप्शन सत्र के लिए कुछ क्रिप्टो-एल्गोरिथ्म द्वारा उस कुंजी के नियंत्रण में मान्य हैं। छोटी एक-समय की चाबियाँ बिना अटूट रूप से होती हैं, क्योंकि एन्क्रिप्शन की सुरक्षा क्रिप्टो एल्गोरिथ्म पर निर्भर करती है जिसके लिए वे उपयोग करते हैं। एक बार पैड की उत्पत्ति 1882 में एक बार की पैड की कहानी शुरू होती है, जब कैलिफोर्नियाई बैंकर फ्रैंक मिलर ने टेलीग्रामस्क्वाट के ट्रांसमिशन में गोपनीयता और गुप्तता का बीमा करने के लिए अपनी छापी लिखित कोड को संकलित किया। इस तरह की पाठ्यपुस्तकें आमतौर पर इस्तेमाल की जाती हैं, मुख्य रूप से शब्दों और वाक्यांशों को संक्षिप्त संख्या-कोड या अक्षर-कोड में तब्दील करके टेलीग्राफ लागत को कम करने के लिए। ये कोडबुक छोटे या कोई सुरक्षा प्रदान नहीं करते हैं हालांकि, मिलीर्स कोडेबैक ने एक अद्वितीय विधि द्वारा सुपरएरिकेंफेरमेंट (कोड के ऊपर एक दूसरे एनसिफरमेंट परत) के लिए निर्देश भी प्रदान किए: उन्होंने तथाकथित शिफ्ट संख्या (कुंजी) को सादेकोड (शब्दों, एक संख्या में परिवर्तित) और परिभाषित किया अनियमित संख्याओं की एक सूची के रूप में शिफ्ट नंबर जो उपयोग के बाद मिटाना चाहिए और फिर कभी भी उपयोग नहीं किया जाएगा उनके कोडेबुक में 14,000 शब्दों, वाक्यांशों और रिक्त स्थान (अनुकूलित करने के लिए) शामिल थे और अगर सादेकोड और चाबी की राशि 14,000 से अधिक हो गई थी, तो एक को राशि से 14,000 घटा देना था। यदि सिफरटेक्स्ट वैल्यू को समझने के दौरान चाबी से छोटा था, तो किसी को सिफरटेक्स्ट से 14,000 जोड़ना पड़ा और कुंजी को घटा देना था (यह मूल रूप से एक मॉड्यूल 14,000 अंकगणित है)। अगर शिफ्ट संख्या बेतरतीब ढंग से चुने गए और केवल एक बार इस्तेमाल की जाती है, तो मॉड्यूलर अंकगणित में अटूट एन्क्रिप्शन प्रदान किया गया था। मिलर ने पहली बार एक बार पैड का आविष्कार किया था। दुर्भाग्य से, मिलर्स का सही सिफ़र कभी भी ज्ञात नहीं हुआ, क्रिप्टोग्राफी के इतिहास में खो गया और कभी भी योग्य क्रेडिट प्राप्त नहीं हुआ। जैसे ही इसका आविष्कार किया गया था, जल्द ही यह गुमनामी में गायब हो गया, केवल 2018 में शोधकर्ता स्टीवन बेलविन द्वारा अभिलेखागार में पुनः खोजे जाने के बाद। फिर, 1 9 17 में, एटीएमएमटी के अनुसंधान अभियंता गिल्बर्ट वर्मन ने टेलेटाइप टीटीई संचार को एन्क्रिप्ट करने के लिए एक प्रणाली विकसित की। यद्यपि वेनम्स आविष्कार गणितीय रूप से मिलर्स विचारों के समान होता है, उन्होंने एक विद्युत प्रणाली तैयार की, जो मिलर्स पेन-एण्ड-पेपर एल्गोरिदम के लिए बिल्कुल अलग थी। इसलिए, ऐसा लगता नहीं है कि वर्म ने मिलर्स विचार उधार लिया था वर्मान ने एक पांच बिट बोडोट-कोडित छिद्रित पेपर टेप को मिलाया, जिसमें एक दूसरे छिद्रित पेपर टेप के साथ संदेश होता था, कुंजी, जिसमें यादृच्छिक पांच-बिट मान थे। छिद्रित टेपों को मिलाकर करने के लिए, एक मॉड्यूल 2 अतिरिक्त (बाद में बूलियन एक्सओआर या एक्सक्लूसिव या के रूप में जाना जाता है) रिले के साथ किया गया था, और कुंजी टेप सिंक्रनाइज़ से भेजने और प्राप्त करने के लिए टेलेक्स मशीन पर चला गया। यह पहली स्वचालित त्वरित ऑन-लाइन एनक्रिप्शन सिस्टम था वर्मान को एहसास हुआ कि लघु कुंजी टेपों के साथ एन्क्रिप्शन (मूल रूप से एक पाली-अल्फाबेटिक साइफर) पर्याप्त सुरक्षा प्रदान नहीं करेगा। प्रारंभ में, वर्म ने दो मुख्य टेप लूप का मिश्रण इस्तेमाल किया, अपेक्षाकृत मूल लंबाई के साथ, एक बहुत लंबे यादृच्छिक कुंजी का निर्माण किया। कप्तान जोसेफ मैबोरग्ने (बाद में यू.एस. सिग्नल कोर के चीफ) ने दिखाया कि बड़ी मात्रा में संदेश ट्रैफिक एन्क्रिप्टेड होने पर भी डबल कुंजी टेप सिस्टम cryptanalysis का विरोध नहीं कर सका। Mauborgne ने निष्कर्ष निकाला कि केवल तभी चाबी टेप अप्रत्याशित है, जब तक कि संदेश के रूप में और केवल एक बार उपयोग किया जाए, संदेश सुरक्षित होगा इसके अलावा, एन्क्रिप्शन अटूट साबित हुआ। एक बार एन्क्रिप्शन पुनर्जन्म था एनएसए ने वर्मेंस 1 9 1 9 एक बार टेप (ओटीटी) पेटेंट को क्रिप्टोग्राफ़िकोट (मैल्विन क्लेन, एनएसए) के इतिहास में सबसे महत्वपूर्ण में से एक कहा है। एटीएमएमटी ने वाणिज्यिक सुरक्षित संचार के लिए 1 9 20 के दशक में वर्णाम प्रणाली का विपणन किया, यद्यपि थोड़ी सफलता के साथ। एक बार के टेपों की भारी मात्रा के उत्पादन, वितरण और खपत ने इसका इस्तेमाल फिक्स्ड स्टेशनों (मुख्यालय या संचार केंद्रों) के लिए सीमित कर दिया। यह द्वितीय विश्व युद्ध तक नहीं था जब यूएस सिग्नल कोर ने ओटीटी सिस्टम को अपने उच्च स्तरीय टेलीप्रिंटर संचार के लिए इस्तेमाल किया था। हालांकि, तीन जर्मन क्रिप्टोग्राजिस्ट ने तुरंत एक बार एन्क्रिप्शन के फायदे को पहचान लिया। 1 9 20 के दशक के शुरुआती दिनों में, जर्मन क्रिप्टोगिस्ट्स वर्नर कुन्ज़े, रूडोल्फ शॉफ़्लर और एरीच लैंगलोत्ज़ ने फ्रांसीसी राजनयिक यातायात क्रिप्टानलालिस किया। ये पेंसिल और पेपर संख्यात्मक कोड कोड पुस्तकों को शब्दों में शब्दों और वाक्यांशों को रूपांतरित करने के लिए उपयोग करते हैं। फ्रांसीसी ने कोड बुक मूल्यों को एन्क्रिप्ट करने के लिए एक छोटी पुनरावृत्ति संख्यात्मक कुंजी (मॉड्यूल 10 तक) जोड़ा। जर्मन क्रिप्टोलोजिस्टियों को इन छोटी चाबियों को तोड़ने में कोई दिक्कत नहीं हुई थी, लेकिन उन्हें एहसास हुआ कि प्रत्येक व्यक्तिगत कोड समूह अंक में एक अनूठे यादृच्छिक कुंजी अंक जोड़कर संदेश अटूट होगा उन्होंने एक ऐसी प्रणाली तैयार की, जिसमें अंकगणित अंक वाले कागज़ात पत्र हैं, प्रत्येक अंक केवल एक बार उपयोग किए जाने के लिए, और चादरें, जिनमें से केवल दो प्रतियां थीं (प्रेषक के लिए एक और एक रिसीवर के लिए), उपयोग के बाद नष्ट हो जाना चाहिए। वास्तव में, उन्होंने फ्रैंक मिलर्स 1882 प्रणाली का फिर से आविष्कार किया। 1 9 23 तक, प्रणाली को अपने विदेशी राजनयिक संदेशों की रक्षा के लिए जर्मन विदेशी कार्यालय में पेश किया गया था (छवि को सही देखें) इतिहास में पहली बार, राजनयिकों के पास उनके निपटान में सचमुच अटूट एन्क्रिप्शन हो सकता था। दुर्भाग्य से, उन्होंने एक सरल यांत्रिक मशीन के साथ उनकी चाबियों के लिए यादृच्छिक अंकों का उत्पादन करने का घातक निर्णय लिया। ऐसा करने से, उन्होंने पूरी तरह सुरक्षित एक बार पैड सिस्टम को एक कमजोर छद्म-यादृच्छिक स्ट्रीम सिफर तक अपमानित किया। 2018 में, शोधकर्ता स्टीवन बेलोविन् ने 1 9 47 में यू.एस. सेना सुरक्षा एजेंसी (एएसए) दस्तावेज की खोज की, जर्मन राजनयिक एक बार के पैड संदेशों के क्रिप्टएनालिसिस पर, जीईई आवागमन को कोडित किया। संदेशों का विश्लेषण पैटर्नों से पता चला है, दिखा रहा है कि additive कुंजी वास्तव में यादृच्छिक नहीं थे। एएसए ने अंततः मूल अंकों की मूल अनुक्रमों को पुनः प्राप्त किया और अंकों को उत्पन्न करने के लिए मशीन का पुनर्गठन किया। इससे उन्हें राजनयिक यातायात को समझने में मदद मिली। यह समझना महत्वपूर्ण है कि यह एक बार पैड को तोड़ने का एक उदाहरण नहीं है (एक बार पैड अटूट है) परन्तु एक ऐतिहासिक रूप से महत्वपूर्ण पाठ्यपुस्तक उदाहरण के लिए खराब कार्यान्वयन, काजू में, ऐसी कुंजी का उपयोग करके जो वास्तव में यादृच्छिक नहीं हैं इस पेन्सिल-एंड-पेपर सिस्टम पर कई बदलाव तैयार किए गए थे। नाम एक बार पैड (ओटीपी) यादृच्छिक अंक या अक्षरों के साथ छोटे नोट पैड को दर्शाता है, आमतौर पर पांच के समूह में मुद्रित होता है। प्रत्येक नए संदेश के लिए, एक नई शीट टूट जाती है। वे गुप्त संचारों के लिए अक्सर बहुत छोटी पुस्तिकाएं या माइक्रोफ़िल्म पर मुद्रित होते हैं 1 9 43 में असुरक्षित कविता आधारित पारदर्शी सिफर और पुस्तक सिफर को बदलने के लिए एक बार पैड विशेष अभियान कार्यकारी (एसओई) का मुख्य सिफर बन गया। कई खुफिया संगठनों, तोड़फोड़ और जासूसी इकाइयों द्वारा द्वितीय विश्व युद्ध के दौरान और बाद में इस प्रणाली का बड़े पैमाने पर इस्तेमाल किया गया था। अटूट एन्क्रिप्शन ऑपरेटरों और उनके संपर्कों को उनके संचार के डिक्रिप्शन और उनकी पहचान के प्रकटीकरण से बचाता है। लंबे समय से चलने वाले आपरेशनों के दौरान सुरक्षा के इस तरह के अन्य एन्क्रिप्शन सिस्टम की गारंटी नहीं दी जा सकती है क्योंकि प्रतिद्वंद्वी को संदेश सफलतापूर्वक डिक्रिप्ट करने के लिए पर्याप्त समय हो सकता है। सोवियत संघ ने अपने सशस्त्र बलों और खुफिया संगठनों के लिए द्वितीय विश्व युद्ध के दौरान और उसके बाद ओटीपी और ओटीटी पर काफी भरोसा किया, जो कि उनके महत्वपूर्ण संचारों को लगभग अभेद्य बनाते हैं। एक प्रणाली जो सोवियत संघ द्वारा और उनके दूतावासों के पत्रों के लिए इस्तेमाल की जाती थी, केवल संवेदनशील शब्दों, नामों और वाक्यांशों को हटाने और उन्हें प्रति नहीं 1quot, quot न 2quot, और इसी तरह बदलना था। इसके बाद, संवेदनशील टेक्स्ट और अनुक्रमित नंबर एक बार पैड के साथ एन्क्रिप्ट किया गया था और यह सिफरटेक्स पत्र के साथ था। केवल उन संवेदनशील हिस्सों को एन्क्रिप्ट करके वे लंबे अक्षर की प्रक्रिया के लिए सिफरटेक्स्ट, काम और समय की मात्रा को बहुत कम कर सकते हैं। 1 9 48 में सोवियत संचार का एक बड़ा परिवर्तन-ओवर एनएसएएस एसआईजीआईएनटी के कई वर्षों से प्रयासों को विफल करने के लिए, एक घटना एनएसए ने ब्लैक फ्राइडे (चैप 3, पी 1 9) को बुलाया। उन्हें विस्तार करने के लिए छवियों पर क्लिक करें दाईं ओर आपको एक-बार पैड के विभिन्न संस्करण मिलते हैं। पूर्व-जर्मन विदेशी खुफिया सेवा एचवीए द्वारा एक-बार पैड शीट और टेक्स्ट में अंकों को परिवर्तित करने के लिए तालिका के साथ प्लास्टिक थैली का उपयोग किया गया था। कनाडा की खुफिया सेवा ने एक लघु एक बार की पैड पुस्तिका, एक माइक्रोडोट रीडर और विशेष लेंस, एक चतुराई से एक खिलौना ट्रक में छुपाया जिसे कनाडा में एक विदेशी खुफिया ऑपरेटर के युवा बेटे द्वारा लाया गया जो देश में जासूसी करने के लिए प्रवेश करता था। सैगोन और बर्लिन के बीच आधिकारिक संचार के लिए इस्तेमाल किए जाने वाले जर्मन एक बार पैड फ़ोल्डर में, एक सौ एक बार पैड कार्यपत्रकों के साथ एक सील फ़ोल्डर के होते हैं, जो 6500 से 6599 तक गिने जाते हैं। प्रत्येक शीट में संदेश लिखने के लिए यादृच्छिक संख्या और पर्याप्त जगह होती है गणना करना आखिरी छवि एक समय के पैड का हिस्सा है, जो कि सोवियत विदेश मंत्रालय के कर्मचारी, अमेज़ॅनेंट दिमित्रीविच ओगोरोडनिक द्वारा इस्तेमाल किया गया था, जो सीआईए (जागरण के लिए क्लिक करें) के लिए जासूसी कर रहे थे। आंद्रेई सिनेलिकोव के वेबपेज पर अधिक (रूसी में) (अनुवाद)। आधिकारिक दस्तावेजों में स्पष्ट सुरक्षा कारणों के लिए एक बार पैड का शुरुआती इस्तेमाल नहीं किया जाता है। फिर भी, मैं ब्रिटिश लाइब्रेरी में इंडिया ऑफिस रिकॉर्ड्स से दस्तावेजों में आया था। वे बताते हैं कि बहरीन पेट्रोलियम कंपनी (बपेको), जो अमेरिकन फॉरेन ऑयल ऑफ कैलिफ़ोर्निया की सहायक कंपनी है जो फारसी खाड़ी में संचालित है, को 1 9 43 में न्यूयॉर्क में अपने कार्यालयों के साथ संवाद करने के लिए एक बार पैड का उपयोग करने की अनुमति दी गई थी। पैदलों को यू.एस. नेवी डिपार्टमेंट द्वारा उन्हें आवंटित किया गया था और विस्कॉन्स के ब्रिटिश सिफर सुरक्षा अधिकारी (फारस और इराक फोर्स, 1 942 से 1 9 43 तक मध्य पूर्व में एक ब्रिटिश और राष्ट्रमंडल सैन्य गठन) द्वारा सत्यापित किया गया था। वे ब्रिटिश इंपीरियल सिविल एडमिनिस्ट्रेशन, ब्रिटिश सेना, लंदन में युद्ध परिवहन मंत्रालय और अमेरिकी नौसेना के राजनीतिक निवासी द्वारा एक बार के पत्र पैड के आधिकारिक उपयोग को कम से कम 1 9 43 के रूप में और आश्चर्यजनक रूप से उन्हें साझा भी करते हैं। वाणिज्यिक कंपनियों के साथ WW2 के दौरान एक बार पैड का उपयोग करें BAPCOs मेरे ब्लॉग पोस्ट भी देखें पेपर वन-टाइम पैड पेंसिल-एंड-पेपर एक बार पैड का इस्तेमाल व्यावहारिक और साजिश के मुद्दों और कम संदेश की मात्रा के कारण सीमित है जो इसे प्रोसेस कर सकता है। 1 9 80 के दशक तक विदेश सेवा संचारकों द्वारा एक बार पैड का व्यापक रूप से उपयोग किया जाता था, अक्सर कोड पुस्तकों के साथ संयोजन में होता था। ये कोड पुस्तकों में सभी प्रकार के शब्द या पूरे वाक्यांश थे, जिनका प्रतिनिधित्व तीन या चार आंकड़ा कोड द्वारा किया गया था। विशेष नाम या अभिव्यक्ति के लिए, जो कोडबुक में सूचीबद्ध नहीं है, इसमें कोड शामिल थे जिसमें एक अक्षर का प्रतिनिधित्व किया गया था जो शब्दों की वर्तनी की अनुमति देता था एन्कोड करने के लिए एक पुस्तक, वर्णमाला और श्रेणी श्रेणी के आधार पर सॉर्ट किया गया था, और संख्याओं के आधार पर सॉर्ट करने के लिए एक पुस्तक थी। ये किताबें लंबी अवधि के लिए वैध थीं और केवल संदेश को सांकेतिकृत करने के लिए ही नहीं थीं - जो कि एक खराब एन्क्रिप्शन पद्धति होगी - लेकिन विशेष रूप से वाणिज्यिक केबल या टेलेक्स पर संचरण की अपनी लंबाई कम करने के लिए। एक बार संदेश संख्या में परिवर्तित हो गया था, संचारक ने इन नंबरों को एक बार पैड के साथ पूरा किया। आम तौर पर दो अलग-अलग पैड का एक सेट था, आने वाले के लिए एक और बाहर जाने वाले संदेशों के लिए। यद्यपि एक बार पैड में एक चाबी की केवल दो प्रतियां होती हैं, एक प्रेषक के लिए और एक रिसीवर के लिए, कुछ प्रणालियों ने कई रिसीवर को संबोधित करने के लिए दो से अधिक प्रतियों का इस्तेमाल किया पैड प्रत्येक छोटे पृष्ठ पर यादृच्छिक संख्या के साथ नोट ब्लॉकों की तरह थे, लेकिन किनारों के साथ मुहरबंद पिछली पैड को फाड़कर केवल अगले पैड पढ़ सकता था। प्रत्येक पैड का इस्तेमाल केवल एक बार किया गया था और तुरंत नष्ट हो गया था। इस प्रणाली को पूर्ण सुरक्षित संचार सक्षम किया गया कैनेडियन विदेश सेवा का एक उत्कृष्ट विवरण जैरी प्रोस्स वेबसाइट पर एक बार पैड पाया जाता है खुफिया एजेंसियों ने क्षेत्र में अपने एजेंटों के साथ संवाद करने के लिए एक बार पैड का उपयोग किया। संपूर्ण और दीर्घकालिक सुरक्षा, एजेंटों, उनकी परिसंपत्तियों और परिचालनों को परिवर्तित करने की पहचान को सुरक्षित करती है। एक बार पैड के साथ, जासूसों को क्रिप्टो सिस्टम नहीं लेना पड़ता है या असुरक्षित कंप्यूटर सॉफ़्टवेयर का इस्तेमाल नहीं करना है। वे बहुत छोटी पुस्तिकाओं में माइक्रोफिल्म पर या कपड़ों पर मुद्रित एक-एक बार की पैड की चाबी ले सकते हैं। ये छिपाने और नष्ट करना आसान है फ़ील्ड में एजेंटों को एक बार पैड एन्क्रिप्ट किए गए संदेश भेजने का एक तरीका संख्या स्टेशनों के माध्यम से है ऐसा करने के लिए, संदेश पाठ एन्क्रिप्शन से पहले अंकों में परिवर्तित हो जाता है। एक अच्छा उदाहरण है टीएपीआईआर तालिका स्टासी, पूर्व पूर्वी जर्मनी खुफिया एजेंसी द्वारा इस्तेमाल किया। TAPIR तालिका के साथ, एक समय पैड के साथ एन्क्रिप्शन से पहले, सादा पाठ को एक तालिका द्वारा आंकड़ों में बदल दिया जाता है, स्ट्रैडलिंग चेकरबोर्ड के समान। सबसे अधिक अक्षरों को एक अंकों के मान में परिवर्तित कर दिया जाता है, और दूसरे अक्षर, सामान्यतः बड़ेम, आंकड़े और लक्षण दो अंकों के मानों में परिवर्तित होते हैं। इसके बाद, सादे पाठ संख्याओं से कुंजी घटाकर अंक को एन्क्रिप्ट किया जाता है। टीएपीआईआर तालिका अंकीय आवृत्ति वितरण में चोटियों को दबा देती है और अनियमित एकल और दोहरे अंकों के मान विभाजन को बनाते हैं। डब्लूआर 80 एक गाड़ी वापसी है बुउ 81 (बुकस्टाबेन) और ज़ी 82 (ज़िफ़र्न) का उपयोग अक्षरों (पीला) और आंकड़े (हरा) के बीच स्विच करने के लिए किया जाता है। ZwR 83 एक स्थान है कोड 84 को तीन अंकों या चार अंकों वाले कोड के लिए उपसर्ग के रूप में उपयोग किया जाता है, जो कि कोडबुक से प्राप्त लंबे शब्दों या वाक्यांशों की जगह होती है। इस प्रकार की पाठ्यपुस्तकों में एक अजीब कोड नंबर अनुक्रम हो सकता है, जो कि कोड संख्या में त्रुटियों का पता लगाने के लिए चुना गया है, जैसा कि इस उदाहरण कोडेबुक में दिखाया गया है। More text-to-digit conversion methods at the Straddling Checkerboards page. Documents, seized by the East-German intelligence Stasi, show detailed one-time pad procedures as used by CIA agents who operated in the former DDR. See also the Guide to Secure Communications with the One-time Pad Cipher (pdf) for detailed information about the use of manual one-time pads. Tapir conversion table SAS und Chiffrierdienst Below, on the left, a one-time pad booklet with Vigenere table from a Western agent, seized by the East-German MfS (Ministerium fr Staatssicherheit or Stasi). The second image is a one-time pad sheet (preserved in a 35 mm slide frame) from an East-German agent, found by the West-German BfV (Bundesamt fr Verfassungsschutz, the federal domestic intelligence). The right-most image is a one-time pad of a West agent, found by the MfS (also preserved in a 35 mm slide frame). The pad itself is only about 15 mm or 0.6 inch wide (thus even smaller than depicted) and virtually impossible to read with the naked eye I even had difficulties to photograph it clearly. Such miniature one-time pads were used by illegal agents, operating in foreign countries, and were hidden inside innocent looking household items like cigarette lighters, fake batteries or ashtrays. You can click the images to enlarge them. However, to read the small pad you will need to click and zoom in once more in your browser after enlarging. Letters-only one-time pad booklet with reciprocal table All images Dirk Rijmenants, taken from the Detlev Freisleben collection. One-time pad based Crypto Machines Until the 1980s, one-time-tapes were widely used to secure Telex communications. The Telex machines used Vernams original one-time-tape (OTT) principle. The system was simple but solid. It required two identical reels of punched paper tape with truly random five-bit values, the so-called one-time tapes. These were distributed beforehand to both sender and receiver. Usually, the message was prepared (punched) in plain onto paper tape. Next, the message was transmitted on a Telex machine with the help of a tape reader, and one copy of the secret one-time tape ran synchronously with the message tape on a second tape reader. Before exiting the machine, the five-bit signals of both tape readers were mixed by performing an Exclusive OR (XOR) function, thus scrambling the output. On the other end of the line, the scrambled signal entered the receiving machine and was mixed, again by XOR, with the second copy of the secret one-time tape. Finally, the resulting readable five-bit signal was printed or perforated on the receiving machine. A unique advantage of the punched paper tape keys was that copying them quickly was virtually impossible. The long tapes (which were sealed in plastic before use) were on a reel and printed with serial numbers and other markings on the side. To unwind the tape, copy it and rewind it again with a perfectly aligned print was very unlikely and such one-time tapes were therefore more secure than other keys sheets that were copied quickly by taking a photo or writing them over by hand. A famous example of one-time pads security is the WashingtonMoscow hotline with the ETCRRM II. a standard commercial one-time tape mixer for Telex. Although simple and cheap, it provided absolute security and unbreakable communications between Washington and the Kremlin, without disclosing any secret crypto technology. Some other cipher machines that used the principle of one-time pad are the American TELEKRYPTON. SIGSALY (noise as one-time pad), B-2 PYTHON and SIGTOT, the British BID-590 NOREEN and 5-UCO. the Canadian ROCKEX. the Dutch ECOLEX series. the Swiss Hagelin CD-57 RT, CX-52 RT and T-55 with a superencipherment option, the German Siemens T-37-ICA and M-190. the East German T-304 LEGUAN. the Czech SD1. the Russian M-100 SMARAGD and M-105 N AGAT and the Polish T-352T-353 DUDEK. There were also many teletype or ciphering device configurations in combination with a tape reader, for one-time tape encryption or superencipherement. The image below explains one-time tape encryption for Telex (TTY Murray). Teletype signal one-time tape encryption One-time tape Teletype Hotline Below are three images of the famous Washington-Moscow hotline, encrypted with one-time tapes. The Hotline became operational in 1963 and was a full duplex teleprinter (Telex) circuit. Although the Hotline always was shown as a red telephone in movies and popular culture, the option of a speech link was turned down immediately as it was believed that spontaneous verbal communications could lead to miscommunications, misperceptions, incorrect translation or unwise spontaneous remarks, which are serious disadvantages in times of crisis. Nevertheless, the red phone myth lived a long life. The real hot line was a direct cable link, routed from Washington over London, Copenhagen, Stockholm and Helsinki to Moscow. It was a double link with commercial teleprinters, one link with a Teletype Corp Model 28 ASR teleprinter with English characters and the other link with East German T-63 teleprinters with Cyrillic character. The links were encrypted with one-time tapes by means of four ETCRRMs (Electronic Teleprinter Cryptographic Regenerative Repeater Mixer). The one-time tape encryption provided unbreakable encryption, absolute security and privacy. Although a highly secure system, the unclassified standard teleprinters and ETCRRMs were sold by commercial firms and therefore did not disclose any secret crypto technology to the opponent. The ETCRRM Image NSA Images Detlev Freisleben Archive (click to enlarge) A Practical Example with Numbers As a little exercise we will decipher a recording of an actual numbers station (see important note below). You can open or download (right-click and Save Target As. ) the sound file below. The broadcast starts with a repeated call sign melody and the receivers call sign quot39715quot, followed by six tones and the actual message. All message groups are spoken twice to ensure correct reception. Write down the message groups once (skip the call sign). Once you have the complete message, write the given one-time pad key underneath it. Add message and key together, digit by digit, from left to right, without carry (e. g. 6 9 5 and not 15). Finally, convert the digits back into text with the help of the quotAT-ONE-SIRquot straddling checkerboard as shown in the previous section. Make sure to separate one-digit and two-digit characters correctly. This little exercise shows exactly how secret agents can receive messages in an absolutely secure manner, with only one-time pads, a small short-wave receiver and pencil and paper. The one-time pad key to decipher this message: Important Note . Although we use a recording from an actual numbers station (Lincolnshire Poacher, E3 Voice), the one-time pad key is fictitious and reverse-calculated (key plaintext - ciphertext) so that a readable but fictitious message is obtained when using this key. In reality, we dont know which key was used, whether we must add or subtract and there is no way to decipher the original message. In fact, since a one-time pad key is truly random, one can calculate any plaintext from a given ciphertext, as long as you use the right wrong key. Thats exactly why one-time pad is unbreakable. Secret Splitting There is a special way to use one-time pad where the key is not to be destroyed. When information should be available only when two people agree to reveal that information, we can use secret splitting. The secret information is encrypted with a single one-time pad whereupon the original plaintext is destroyed. One user receives the encrypted message and the other user the key. In fact, it doesnt matter who gets which, since both pieces of information can be seen as equal, encrypted parts of the original information. The split parts are both called keys. Both these keys are useless without each other. This is called secret splitting. One could encrypt for example the combination to a safe and give the split ciphertext to two different individuals. Only when they both agree upon opening the safe, will it be possible to decipher the combination to the safe. You could even split information into three or more pieces by using two or more keys. In this little example Charlie splits his secret safe combination 21 46 03 88. A random key is subtracted digit by digit, without carry, from the combination numbers. Alice and Bob both receive one piece of the information from Charlie. Its mathematically impossible for both Alice and Bob to retrieve the combination numbers unless they share their keys. This is done by simply adding the keys (without carry). Of course, we could also use secure splitting on text to encrypt passwords and such. Just convert the text into numbers (e. g. A01, B02 and so on through Z26) or use a straddling checkerboard. To split the secret into more parts, just add a one-time key for each of the new persons. For three persons you must subtract two keys (without carry) from the plaintext to obtain the ciphertext (e. g. 2 - 4 - 9 9 Because 2 - 4 12 - 4 8 and 8 - 9 18 - 9 9). Instead of keeping your secret password in an envelop, you could split it and give the shares to different persons, of which at least one is trusted. One person could never act on his own and approval of a second person is always required. When granddad, old and sick, splits the secret combination from the safe that contains his money and gives each of his children one part, they can only get their hands on his money if they all agree (not that this will make him live longer). However, since this system is unbreakable, all information is lost if one of the shares goes missing. Theres no way back if a share is lost or destroyed by accident It might be useful to have one extra copy of your share somewhere on a secure location. More about Secret Splitting on this page . About Modular Arithmetic Modular arithmetic has interesting properties that play a vital role in cryptography and it is also essential to the security of one-time pad encryption. The result of an encryption process could reveal information about the key or the plaintext. Such information might either point to possible solutions or enable the codebreaker to discard some wrong assumptions. The codebreaker will use this information as a lever to break open the encrypted message. By using modular arithmetic on the result of a calculation we can obscure the original values that were used to calculate that result. In mathematics, modulo x is the remainder after the division of a positive number by x. Some examples: 16 modulo 12 4 because 16 divided by 12 is 1 and this leaves a remainder of 4. Also, 16 modulo 10 is 6 because 16 divided by 10 is 1 and thus leaves a remainder of 6. Fortunately, theres a far easier way to understand and work with modular arithmetic. Modular arithmetic works similarly to counting hours, but on a decimal clock. If the hand of our clock is at 7 and we add 4 by advancing clockwise, we pass the 0 and arrive at 1. Likewise, when the clock shows 2 and we subtract 4, advancing anticlockwise, we arrive at 8. Modular arithmetic is very valuable to cryptography because the result value reveals absolutely no information about the two values that were added or subtracted. If the result of a modulo 10 addition is 4, we have no idea whether this is the result of 0 4, 1 3, 2 2, 3 1, 4 0, 5 9, 6 8, 7 7, 8 6 or 9 5. The value 4 is the result of an equation with two unknowns, which is impossible to solve. The modulus should have the same value as the number of different elements, with 0 designated to the first element: Mod 10 for digits as they can have 10 values (0 - 9) Mod 26 for letters as they can have 26 values (A - Z) with A 0 through Z 25 Mod 2 for bits as they can have two values (0 and 1) Mod 256 for bytes as they can have 256 values (0 - 255) Modulo 10 is very easy to perform by adding without carry and subtracting without borrowing, which basically means discarding all but the most-right digit of the result. It could not be easier for one-time pad encryption with digits. Performing modulo calculations on letters is a bit more complex and requires conversion into numerical values. If we combine the letter X (23) with key Z (25) modulo 26, the result will be 22 (W) because (23 25) mod 26 22. Thats way more elaborate and slower than decimal modulo 10. Fortunately, we can use the Vigenere Square or a circular Vigenere cipher disk to perform modulo 26 easily without any calculations. Note that you should never assign the values 1 through 26 to the letters because the result of a modulo calculation can be zero, for example (25 1) mod 26 0. Modular calculations with bits and bytes are actually Exclusive OR operations (XOR) in Boolean modular arithmetic. XOR is used in computer programming to combine a data bit with a random key bit or to combine a data byte with a random key byte. Lets show the danger of not using modular arithmetic. With normal addition, the ciphertext result 0 can only mean that both key and plaintext have the value 0. A ciphertext result of 1 means that the two unknowns can only be 0 1 or 1 0. With result 2, the unknowns can only be 0 2, 1 1 or 2 0. Thus, for some ciphertext result values we can either immediately determine the unknowns or we can see which unknowns of the equation could be possible or impossible. Suppose we add the letter X (23) with key Z (25) without modulo. In that case, the result would be ciphertext 48, as we cannot convert 48 into a letter. However, although both plain letter and truly random key are unknown, we can draw some important conclusions: the total of 48 is only possible with combinations X (23) Z (25), Y (24) Y (24) or Z (25) X (23). By merely looking at the ciphertext, we can discard all letters A through W as possible candidates for that particular plaintext and key letter. This is also the reason why you should never use text that is converted into digits as numerical key for a one-time pad (some book ciphers use this system). The result wil never be random as it consists of a limited range of 26 elements (0-25 or 1-26) instead of 10 elements (0-9) or 100 (0-99), resulting in a completely insecure ciphertext with a tremendous bias. These simple examples show how a ciphertext can leak information that is very valuable to the codebreaker, simply because normal instead of modular arithmetic was used to calculate the ciphertext. Not using modular arithmetic always causes a biased ciphertext instead of the truly random ciphertext result from modular arithmetic. Any bias is as valuable as gold to the codebreaker. Modular arithmetic is therefore vital to the security of the one-time pad. Never use one-time pad encryption without applying modular arithmetic Is One-time pad Really Unbreakable Is one-time pad encryption absolutely secure and unbreakable when all rules are applied correctly Yes Its also easy to show why, because the system is simple and transparent. It all comes down to two simple basic facts that are easily understood: One time pad is an equation with two unknowns, one of which is truly random. When a truly random key is combined with a plaintext, the result is a truly random ciphertext. An adversary only has the random ciphertext at his disposal to find key or plaintext. This is an equation with two unknowns, which is mathematically unsolvable. There is also no mathematical, statistical or linguistic relation whatsoever between the individual ciphertext characters or between different ciphertext messages because each individual key letter or digit is truly random. The modulo 26 (one-time pad with letters) or modulo 10 (one time pad with digits) also ensures that the ciphertext does not reveal any information about the two unknowns in the equation (see previous paragraph). These properties render useless all existing cryptanalytic tools that are available to the codebreaker. Suppose we have the piece of ciphertext quotQJKESquot, enciphered with a one-time letter pad. If someone had infinite computational power he could go through all possible keys (a brute force attack). He would find out that applying the key XVHEU on ciphertext QJKES would produce the (correct) word TODAY. Unfortunately, he would also find out that the key FJRAB would produce the word LATER, and even worse, DFPAB would produce the word NEVER. He has no idea which key is the correct one. In fact, you can produce any desired word or phrase from any one-time pad - encrypted message, as long as you use the right wrong key. There is no way to verify if a solution is the right one. Therefore, the one-time pad system is proven completely secure. Three of the many possible solutions: Let us give an example with one-time pad encryption, based on digits. For encryption, plain and key are subtracted. For decryption, the key is added to the ciphertext. The following straddling checkerboard is used for text to digit conversion. Suppose we intercepted the following ciphertext fragment: Unfortunately, there is no way to check which of the two keys and resulting plaintext are correct. Well, here is the bad news: both solutions are incorrect. The actual message is found below, but we will never know for certain whether this is the actual message, unless we have the original key at our disposal. These examples again show that we can produce any plaintext from any ciphertext, as long as we apply the 147proper148 wrong key. Since the plaintext is determined by a series of truly random key digits, mathematically unrelated to each other, we have absolutely no idea whether the chosen key is correct. Any readable solution is mathematically and statistically equally possible and appears valid. There is no way to verify the solution, as it originates from random digits. The system is therefore information-theoretically secure. You have an unbreakable cipher. Its the only existing unbreakable cipher and it will stay unbreakable forever, regardless any future mathematical or technological advances or infinite time, available to the codebreaker. The one-time pad encryption scheme itself is mathematically unbreakable. The attacker will therefore focus on breaking the key instead of the ciphertext. Thats why a truly random key is essential. If the key is generated by a deterministic algorithm the attacker could find a method to predict the output of the key generator. If for instance a crypto algorithm is used to generate a random key, the security of the one-time pad is lowered to the security of the used algorithm and is no longer mathematically unbreakable. If a one-time pad key, even truly random, is used more than once, simple cryptanalysis can recover the key. Using the same key twice will result in a relation between the two ciphertexts and consequently also between the two keys. The different ciphertext messages are no longer truly random and its possible to recover both plaintexts by heuristic analysis. Another unacceptable risk of using one-time pad keys more than once is the known-plaintext attack. If the plaintext version of a one-time pad encrypted version is known, it is of course no problem to calculate the key. This means that if the content of one message is known, all messages that are encrypted with the same key are also compromised. Breaking a Reused One-time pad Using a one-time pad more than once will always compromise the one-time pad and all ciphertext, enciphered with that one-time pad. To exploit reused one-time pads we can use a heuristic method of trial and error. This simple method enables the complete, or at least partial, deciphering of all messages. This can even be done with pencil and paper, although it is a slow and cumbersome process. The principle is as follows: a crib, which is a presumed piece in the first plaintext, is used to reverse-calculate a piece of the key. This presumed key is than applied at the same position on the second ciphertext. If the presumed crib was correct than this will reveal a readable part of the second ciphertext and provide clues to expand the cribs. In the following example we will demonstrate the breaking of two messages, only with the aid of pencil and paper. We have two completely different ciphertext messages, quotAquot and quotBquot. They are both enciphered with the same one-time pad, but we have no knowledge of that key. Let us begin with assuming that the letters are converted into digits by assigning them the values A01 trough Z26, that the enciphering is performed by subtracting the key from the plaintext without borrowing (5 - 8 15 - 8 7) and that deciphering is performed by adding ciphertext and key together without carry (7 6 3 and not 13). This is a standard and unbreakable application of one-time pad, if only they had never used that one-time pad twice The reason I use the basic A01 to Z26 is to make it easier to see the separate letters. The described heuristic analysis works also with a straddling checkerboard (one-digit and two-digit conversions). First, we must search for a crib. A crib is an assumed piece of plaintext that corresponds to a given ciphertext. These can be commonly used words, parts of words, or frequently used trigrams or bigrams. Some examples of frequent trigrams in the English language are quotTHEquot, quotANDquot, quotINGquot, quotHERquot and quotHATquot. Frequent bigrams are quotTHquot, quotANquot, quotTOquot, quotHEquot, quotOFquot and quotINquot. Of course, a crib should be as long as possible. If you know who sent the message and what he might be talking about you could try out complete words. In our example, we dont have any presumed words, so well have to use some other group of letters. Lets try the crib quotTHEquot, which is the most frequently used trigram in the English language. Now, in this example we only have one small piece of ciphertext. In real life, you might have a few hundred digits at your disposal for testing, which makes a successful crib more likely. We align the letters quotTHEquot with every position of ciphertext quotAquot and subtract the ciphertext from the crib. The result is the assumed one-time key. In heuristic terms, this is our trial. To test it, we add the assumed key to ciphertext quotBquot to recover plaintext quotBquot. Unfortunately, as shown underneath the first quotTHEquot of the example, we get our heuristic error. We continue to try out all positions. For the sake of simplicity, I only show three example positions of the crib. Our trial and error will show us that the 9th character position (17th digit) provides a possible correct plaintext quotBquot, the trigram quotOCUquot. There are a few, but not too many, solutions to complete this quotOCUquot piece of plaintext, and well have to try them all out. So, lets try out the obvious quotDOCUMENTquot. This assumption has to pass our trial and error again. Therefore, here below, we use quotDOCUMENTquot as a crib for plaintext quotBquot at exactly the same place. We subtract ciphertext B from the assumed plaintext quotDOCUMENTquot to again recover a new portion of the presumed key. Our presumed key is now already expanded to 16 digits. We add this presumed key to ciphertext quotAquot to hopefully recover something readable and indeed, quotOTHESTATquot could well be a correct solution, thus confirming the used crib. Can we make this crib any longer quotTHE STATquot could be part of quotTHE STATUSquot, quotTHE STATIONquot or quotTHE STATICquot, and quotO THEquot might be expandable to quotTO THEquot, as quotTOquot is a popular bigram that ends with the letter O. Again we must test these solutions by recovering the related assumed key and try that key out on the other ciphertext. If correct, this will again reveal another little readable piece of plaintext. Remember we started only with the assumption that there could be a quotTHEquot in one messages and already end up with quotDOCUMENTquot and quotTO THE STAT. quot after only two heuristic steps This process is repeated over and over. Some new cribs will prove to be dead end and others will result in readable words or parts of words (trigrams or bigrams). More plaintext means better assumptions and the puzzle will become easier and easier. Thanks to the two ciphertexts, you can verify the solutions of one plaintext with its counterpart ciphertext, over and over again, until the deciphering is completed. Finally, well give the solution, just to verify the results of our trial and error: Little fragments like, for example, quotFORMAquot is easily expanded to quotINFORMATIONquot, gaining 6 additional letters as a crib. quotRANSPquot is most likely quotTRANSPORTquot or, with some luck, quotTRANSPORTATIONquot, providing 9 additional letters, a quite large crib. Sometimes, the already recovered text provides clues about the words that precede or follow them, or will help to get ideas for words on other places in the message. Its a slow and tedious process, but the patchwork will gradually grow. Slow, cumbersome and tedious pays off in this line of work. This method is also usable when the text is converted into digits with a straddling checkerboard or any other text-to-digit conversion systems. Of course, this example is short and simple. In reality, there could be all kinds of complications that require many more trials. What system is used to convert text into digits What language is used Did they use abbreviations or slang Are there words available as cribs or do we need to piece together trigrams or even bigrams until we have a word to get launched Does the message contain actual words or are there only codes from a codebook Is the one-time pad reused completely or only partially, and do they start at the same position in both messages All these problems can slow down the heuristic process and require a vast number of trials, with associated dead ends and errors, before the job is done. Success is not guaranteed, but in most cases, the reuse of one-time pads will result in a successful deciphering. This is certainly the case with todays computer power, enabling fast heuristic testing. History provides various examples of bad implementation or negligent use of one-time pads. The breaking of the war-time German diplomatic message traffic is a fine example of flawed implementation. The German foreign office could have been the first to implement the perfectly secure one-time pad system but instead decided to generate the keys with a simple mechanical machine. By doing so, they neglected the first crucial rule of one-time pad that the key should be truly random. The U. S. Army Security Agency did not actually break German one-time pad encrypted traffic but basically exploited a flawed pseudo-random stream cipher. The VENONA project is probably the most notorious and well-known example of how important it is to follow the basic rules of one-time pad. Soviet Intelligence historically always relied heavily on one-time pad encryption, with good reason and success. Soviet communications have always proved extremely secure. However, during the Second World War, the Soviets had to create and distribute enormous quantities of one-time pad keys. Time pressure and tactical circumstances lead in some cases to the distribution of more than two copies of certain keys. In the early 1940s, the United States and Great Britain analyzed and stored enormous quantities of encrypted messages, intercepted during the war. American codebreakers discovered by cryptanalysis that a very small portion of the tens of thousands of KGB and GRU messages between Moscow and Washington were enciphered with reused one-time pads. The messages were encoded with codebooks prior to enciphering with one-time pad, making the task even immensely harder for the codebreakers. Finding out which key was reused on what message, the reconstruction of the codebooks and recovering the plaintext were enormous challenges that took years. Eventually they managed to reconstruct more than 3,000 KGB and GRU messages, just because of a distribution error by the Soviets. VENONA was crucial in solving many spy cases. Although VENONA is often mistakenly referred to as the project that broke Soviet one-time pads, they never actually broke one-time pad, but exploited implementation mistakes as described above. Make no mistake It will never be possible to break one-time pad if properly applied. This example only shows how to exploit the most deadly of all mistakes: reusing a one-time pad. Random Numbers The use of a truly random key, as long as the plaintext, is an essential part of the one-time pad. Since the one-time algorithm itself is mathematically secure, the codebreaker cannot retrieve the plaintext by examining the ciphertext. Therefore, he will try to retrieve the key. If the random values for the one-time key are not truly random but generated by a deterministic mechanism or algorithm it could be possible to predict the key. Thus, selecting a good random number generator is the most important part of the system. In the pre-electronic era, true random was generated mechanically or electro-mechanically. Some of the most curious devices were developed to produce random values. Today, there are several options to generate truly random numbers. Hardware Random Number Generators (RNGs) are based on the unpredictability of physical events. Some semiconductors such as Zener diodes produce electrical noise in certain conditions. The amplitude of the noise is sampled at fixed time intervals and translated into binary zeros and ones. Another unpredictable source is the tolerance of electronic component properties and their behavior under changing electrical and temperature conditions. Some examples are ring oscillators that operate at a very high frequency, the drift, caused by resistors, capacitors and other components in oscillators or time drift of computer hardware. Photons, single light particles, are another perfect source of randomness. In such systems, a single photon is sent through a filter, and its state is measured. The quality of such randomness sources can be verified with statistical tests to detect failure of the system. Even when hardware-based true random generators are used, it will be necessary in some cases to improve their properties, for instance to prevent unequal distribution of zeros or ones in a sequence. One simple way to improve or whiten a single bit output is to sample two consecutive bits. The value sequence 01 would result in an output bit 0 and the value sequence 10 would give output 1. The repetitive values 00 and 11 are discarded. Some hardware RNGs are the Mills Generator with a combination of several ring oscillators, the Quantis QRNG. based on the unpredictable state of photons, the CPU clock jitter based ComScir generators, and the VIA Nano processor with its integrated dual quantum RNGs. Another option is the manual generation of numbers. Of course, this time consuming method is only possible for small volumes of keys or key pads. Nevertheless, its possible to produce truly random numbers. You could use five ten-sided dice (see image right). With each throw, you have a new five-digit group. Such dice are available in toy stores or you could make them yourself ( dice template ). Never ever simply use normal six-sided dice by adding the values of two dice. This method is statistically unsuitable to produce values from 0 to 9 and thus absolutely insecure (the total of 7 will occur about 6 times more often that the values 2 or 12). Instead, use one black and one white die and assign a value to each of the 36 combinations, taking in account the ordercolor of the dice (see table below). This way, each combination has a .0277 probability (1 on 36). We can produce three series of values between 0 and 9. The remaining 6 combinations (with a black 6) are simply disregarded, which doesnt affect the probability of the other combinations. You could also assign the letters A through Z and numbers 0 through 9 to all 36 dice combinations, again taking in account the ordercolor as in the table above. This way, you can create one-time pads that contain both letters and numbers. Such one-time pads can be used in combination with a Vigenere square, similar to the one described above, but with a 36 x 36 grid where each row contains the complete alphabet, followed by all digits. This will also produce a ciphertext with both letters and numbers. An advantage is that your plaintext can contain figures. You can also use lotto balls. However, after extracting a number, that ball must always be mixed again with the other balls before extracting the next ball. If random bit values are required you can use one or more coins that are flipped, with one side representing the zeros and the other side the ones. With 8 coins you could compose an 8 bit value (byte) in one throw. Many other manual systems can be devised, as long as statistical randomness is assured. These simple but effective and secure methods are suitable for small one-time pads or small keys that are used to protect passwords (see Secret Splitting ). Another alternative is the use of a software based generator. However, software random number generators will never provide absolute security because of their deterministic nature. Crypto secure pseudo-random number generators (CSPRNGs) produce a random output that is determined by a key or seed. A large (unlimited) amount of random values is derived from a seed or key with a limited size, and seed and output are related to each other. In fact, youre no longer using one-time encryption, but an encryption with a small sized key. Brute forcing the seed by trying out all possible seeds, or analysis of the output or parts of the output could compromise the generator. There are techniques to improve the output of CSPRNGs. Using a truly random and very large seed is essential. This could be done by accurate time or movement measurements of human interaction with the computer, for instance mouse movements, or by measuring the drift of computer processes time (note that a normal computer RND function is totally insecure). Another technique to drastically improve a CSPRNG is to combine the generator output with multiple other generators, the so-called quotwhiteningquot. This will make analysis of the output much more difficult because each generator output obscures information about the other generator outputs. In the end, however, only one time pad encryption, based on truly random keys, is really unbreakable. More information about the secure generation of randomness is found in the IETF RFC 1750 Randomness Recommendations for Security. Theres also the issue of secure computers to process, store or print the truly random numbers. Even the use of a hardware generator with truly random output, necessary for absolute security, is useless if the computer itself is not absolutely secure. Unfortunately, theres no such thing as a secure personal computer. The only absolutely secure computer is a physically separated computer, with restricted inputoutput peripherals, never connected to a network and securely stored with controlled access. Any other computer configuration will never guarantee absolute security. Cryptographic software is only secure on a stand-alone computer or dedicated crypto equipment. Usability and Future of One-time Pad One-time pad encryption is only possible if both sender and receiver are in possession of the same key. Therefore, we need a secure exchanged beforehand, physically through a trusted courier, or electronically by a perfect secure system like quantum key distribution. The secure communications are therefore expected and planned within a specific time frame. Enough key material must be available for all required communications until a new exchange of keys is possible. Depending upon the situation, a large volume of keys could be required for a short time period, or little key material could be sufficient for a very long time period, up to years or even decades. One-time pads are especially interesting in circumstances where long-term security is essential. Once encrypted, no single future cryptanalytic attack or technology will ever be able to decrypt the data. In contrast, information that is encrypted with current traditional computer algorithms will not withstand future codebreaking technology and can compromise people or organizations years after. Although one-time pad is the only perfect cipher, it has two disadvantages that complicate its use for some specific applications. The first problem is the generation of large quantities of random keys. We cannot produce true randomness with simple mechanical devices or computer algorithms like a computer RND function or stream ciphers. Hardware true random generators, usually based on noise, are the only secure option. The second problem is key distribution. The amount of key needed is equal to the amount of data that is encrypted and each key is for one-time use only. Therefore, we need to distribute large amounts of keys to both sender and receivers in a highly secure way. Of course, it would be useless to send the one-time pads to the receiver by encrypting them with AES, IDEA or another strong algorithm. This would lower the unbreakable security of the pads to the security level of the algorithm that was used. These are practical problems, but solutions exist to solve these problems for certain applications. Another disadvantage is that one-time encryption doesnt provide message authentication and integrity. Of course, you know that the sender is authentic, because he has the appropriate key and only he can produce a decipherable ciphertext, but you cannot verify if the message is corrupted, either by transmission errors or by an adversary. A solution is to use a hash algorithm on the plaintext and send the hash output value, encrypted along with the message, to the recipient (a hash value is a unique fixed-length value, derived from a message). Only the person who has the proper one-time pad is able to correctly encrypt the message and corresponding hash. An adversary cannot predict the effect of his manipulations on the plaintext, nor on the hash value. Upon reception, the message is deciphered and its content checked by comparing the received hash value with a hash that is created from the received message. Unfortunately, a computer is required to calculate the hash value, making this method of authentication impossible for a purely manual encryption. One-time pad encryption nevertheless has a bright future. It is in fact the only crypto algorithm that has any future. Once that computational power and codebreaking technology has surpassed the capabilities of cryptologists and the limitations of mathematics to make strong encryption, there will no longer be any crypto algorithm that survives the evolution of cryptology, unless it meets the standards of information-theoretical perfect security. Just as classical pencil-and-paper ciphers were rendered useless with the advent of the computer, so will current computer based crypto algorithms become victim to the evolution of technology, and that moment might creep on us much faster than we expect. Only one-time pad encryption, the only information theoretically secure encryption, will survive that evolution. Technology and science, instead of cryptologists, must then provide a solution to the key distribution issues. This can be some modern high-tech version of the briefcase with handcuffs or quantum key distribution (QKD) which is already in use today. QKD and one-time pad are a perfect combination. ECOQC in Vienna, Austria, was in 2008 the first ever QKD protected network. The current DARPA Quantum network has ten nodes. ID Quantique, QuintessenceLabs and SeQureNet are some of the commercial firms that currently offer QKD networks. One way or the other, one-time pad encryption and a system to distribute its keys, practical or impractical, will be implemented in the future because we will have no other choice. The current precarious state of Internet security, or rather the lack of security, is where the limited use of one-time pad encryption for specific purposes comes into the play. One might have found it ridiculous in our high-tech world, if it wasn146t for the disastrous state our privacy is in today. Indeed, even the pencil and paper one-time pad still provides a practical encryption system for sensitive private communications where the correspondents can perform all calculations by hand and without the aid of their insecure computers and unreliable network. You could call it the poor mans one-time pad, but it works perfectly and it is the only system that we can really trust today and, the best of all, nobody will ever be able to decipher your messages, not even three-letter organizations. More on One-time Pad at This Website Straddling checkerboards Various different systems to convert plain text into digits prior to encryption Numbers Stations The mysterious spy stations that broadcast numbers messages Guide to Secure Communications with the One-time Pad Cipher how to use one-time pads and set up secure communications with them TEMPEST How a one-time tape mixer lead to surpression of spurious signals Cuban Agent Communications Paper on Cuban numbers stations, Cuban agents in the U. S. and the errors they made Secret Splitting A secure way to share your secret combination or password Spies and Numbers - Here to Stay The use of one-time pads in espionage Is One-time Pad History Usability of one-time pad in todays world Numbers 9.0 Crypto Secure Cipher Pad Generator CT-46 OTP One Time Pad Training Tool (direct Zip download) Operation Tinker Bell Decipher one-time pad messages during the hunt for a KGB defector Copyright 2004 - 2017 Dirk RijmenantsAfter some crypto sillyne ss with feliam. julianor and ortegaalfredo on Twitter I cooked up a one-time pad crypto implementation in Python. This speaks volumes, not of my talent as a cryptographer (which is none at all) but the sad state of my social life these days (which happens to be the same amount). What is one-time pad encryption Feel free to skip this section if you already know the answer. Especially so you don8217t have to suffer my layman8217s explanations of cryptography. To put it simply, a one-time pad cipher is one in which the plaintext (i. e. the original message) is encoded using a completely new, random key each time it8217s sent. When properly used (and I hope I have) this system is provably unbreakable . That means the ciphertext (that is, the encoded message) can never be decoded without the proper key 8211 even if the encoding algorithm is very simple, like a bitwise XOR operation on each byte. There are a few caveats . first of all, the key can never be reused. If you do, the system not only ceases to be unbreakable but it8217s also as strong as the encoding algorithm you used. So if you chose XOR encoding and were tempted to use the key twice, you might as well have used a 8220magic ring8221 from a cereal box. The second caveat: the key must be truly random . For this reason need a random generator that can guarantee a certain amount of entropy, for example devrandom on many Unix systems, to get the one-time pads, instead of the random module, which is only a PRNG (pseudo-random generator). PRNGs can only produce a seemingly random stream of numbers, all derived from a single value (called the seed number) 8211 so it8217s 8220randomness8221 is just as good as the seed number from which all others are calculated. (This is a useful property in other contexts, like avoiding to have to store the contents of all malformed files produced by a fuzzer in order to reproduce the crashes, but I digress). The third caveat: the key must never be transmitted over an insecure medium . Sounds pretty much like a no-brainer, I know, but it8217s worth mentioning that public key crypto doesn8217t suffer from this problem. (Now you know why GPG is so much better than this). Real-life uses of one-time pads include storing the keys in codebooks, which the recipient of the message would carry everywhere. Then the encrypted messages could be safely sent in the clear, say on some radio frequency by a numbers station. until the codebook was used up. How does this code work If you weren8217t among the lucky ones who skipped over my ramblings in the previous section you can easily guess by now: we8217ll be using a bitwise XOR encoding of each byte of the plaintext against the corresponding byte of the one-time pad to produce the ciphertext. This is how we generate a one-time pad of any given size: The alternative for the lazy is to pass the name of the file we want to encrypt. A one-time pad of the exact same size will be generated. We8217ll use the - f flag this time to force overwriting the previous file. And to satisfy all audiences, there8217s also an option for the paranoid: the - p flag uses devrandom for maximum security instead of the much faster devurandom . It does take considerably longer to generate even small one-time pads, that8217s why this option is disabled by default. Now that we have our one-time pad we can encrypt the message: Both files are the same size but have different contents. Since it8217s no longer ASCII trying to cat the file only renders a bunch of garbage in the terminal. Finally, this is how you decrypt it: After decryption, conscience2.txt is identical to the original file and contains the familiar text of The Conscience of a Hacker. As always, the code is available for download below. Enjoy 24-Jul-2018 . Small update to the command like parsing and the documentation. This implementation is very good and the only problem I see is that the script doesn8217t work with a bigger key than the message. Let me explain: At this point, every time you will create a message, you will have to create the key at the same time. And there comes the problem of sharing the key (there is no trusted network except direct exchange face to face). If you build keys in advance and share them (face to face), you will not be able to use them because there is a very very low probability that your key have the same size as your message. A good solution is that the portion of the key used to encrypt the message is only the part that is necessary. ex: message: hello world key: uvpagbbaetpjzlf result: bzaluoxovesjzlf The 8220jzlf8221 part is useless, and the key will not be reused. What do you think A friend said to me: devrandom use random bytes. The encrypted message with a longer key than the message will have unreadable characters andor be unreadable. gt Why not using 8220lt devurandom tr - cd A-Za-z0-9 head - c20quot instead of quotdevurandomquot Unreadability should not be a problem if the message is already encoded in a way that lets you know where it ends. For example you can null-terminate the string like in C for text messages. I like the idea of having the tool use only parts of a pre-generated pad, by consuming one byte at a time. Bear in mind though, this is just a coding example I8217m not a cryptographer and I never meant this script to be used in real life8230 gtgt Why not using lt devurandom tr - cd A-Za-z0-9 head - c20quot instead of quotdevurandomquot I039m believe that would be a bad idea, though. Filtering random bytes makes them not random anymore. The first problem I see is that printable text in that range (A-Z, a-z, 0-9) have always the highest bit set to 0. Since (n xor 0 0) that would leave the high bit of every byte unencrypted. This is a big problem when trying to encrypt binary files, for example an attacker might try to match those bits against a known set of possible plaintexts. For text files this would not be a problem8230 except that you039re revealing the fact that you039re encrypting printable text, and that might also help the attacker. The second problem I see is that the remaining keyspace for each byte is 27 (128) but the total number of possible values is less than that (59), and that made me think the remaining bits are not evenly distributed. After a quick test of converting all 59 values to base 2 and printing them you can see that they039re effectively not random at all 8211 the 7th bit is almost always 1, for example. Now, I have no idea how to exploit that, but a proper cryptographer might. This may also not be a problem when encrypting readable text (the plaintext bits would also fall in a similar pattern) but I can039t be sure of this with my current knowledge of crypto, so I prefer to guess the worse. To solve the quotreadabilityquot problem I would rather encode the ciphertext and the key using any encoding algorithm that leaves printable characters (base64, uuencode, ascii-armor, etc.). This is the quick test I made to see how characters are distributed: python - c 8220for x in (range(ord(821608217),ord(821698217))range(ord(8216A8217),ord(8216Z8217))range(ord(8216a8217),ord(8216z8217))): print bin(x)2:.zfill(8)8221 8220The first problem I see is that printable text in that range (A-Z, a-z, 0-9) have always the highest bit set to 0. Since (n xor 0 0) that would leave the high bit of every byte unencrypted 8230 I can8217t be sure of this with my current knowledge of crypto, so I prefer to guess the worse.8221 You8217re doing it right. This is why I tell you I8217m far from a cryptographer. Far behind you Well, if each character begin by a bit set to 0, I think the first approach would be to test any character in the latin alphabet 8216XORed8217 with themselves which leaves very few patters (26)8230. Like I8217ve read yesterday, little mistakes in cryptography can make big blasts. My idea Bad idea spotted. also a nice otp implementation with some extras urbanware. orgerfr. php to be frank i tried executing code. but i am not able to understand the output. it shows this: can you plz explain me this One-time pad example in Python by Mario Vilas (mvilas at gmail dot com) breakingcode. wordpress20180217one-time-pad-encryption-in-python Create a one-time pad:.onetime. py generate - k example. key - s size. onetime. py generate - k example. key - t example. txt Encrypt a file:.onetime. py encrypt - t example. txt - k example. key - c example. cipher Decrypt a file:.onetime. py decrypt - c example. cipher - k example. key - t example. txt Options: - h, 8211help show this help message and exit - t FILE, 8211textFILE plaintext filename - c FILE, 8211cipherFILE ciphertext filename - k FILE, 8211keyFILE one-time pad filename - s NUM, 8211sizeNUM one-time pad size in bytes - f, 8211force force overwriting of any output files - p, 8211paranoid use devrandom instead of devurandom (slower) joa, is it possible that you did not give any or invalid arguments Just executing the code or without the required arguments will print the usage information. This is not an interactive program. It requires command-line arguments. The usage information tells you what is required. There also are usage examples. I also took a look at 8220erfr8221 which 8220hose8221 mentioned above. Works the same way. I cannot code, but I find your example very nice. Thanks for it. But in order to make it actually useful in practice, could you please implement it such that, as mentioned by Jens, it can take larger keys The code should only assert that the key is gt than the plain text. Unreadable cypher text (in case you cannot pass on the file but need to paste it somewhere) is not a problem, as you can easily b64encode it. Unreadable decrypted code is the only real issue. The solution would be if you can somehow define a marker for the end of the plaintext, such that in the decryption method you8217d decrypt step by step, until the end of plaintext is reached, i. e. until you read the end marker. The rest of the cypher text (the one that would result in unreadable random appended to the file, thus preventing the file from being opened. But the problem is that the marker needs to be something that under no circumstances can be part of the plaintext itself 8211 easy if you only want to encrypt text. But what if I wanted to encrypt e binary So in your current implementation, not only you would have to know the size of the texts you want to encrypt and send, before you even write them, so that you can hand your contact the corresponding keys, but also does the cypher text reveal the actually exact length of the plain text. With very long texts it might not be a problem. But what if you send an answer to a Yes-or-No question and the answer is exactly 3 bytes long You see my point The OTP scrambles the mapping of cypher text letter to plain text letter but if you can guess the plain text by other means, it cannot help. If those other means are outside the cypher text itself (like key compromise, keylogger, ), this is not in the scope of the OTP encryption. But if it is the cypher text which reveals something, then it does fall into the domain of the implementation. So, for the paranoid: Do NOT only use the part of the (longer) key that you really need, but always a tiny bit more. Not a fixed number though. I8217d suggest than during encryption you choose a number of additional bytes (bits) at random, with higher numbers getting exponentially less likely, c. f. exponential distribution. The average of this overhead length could be linked to the plaintext file length. In this case you8217d need still only one marker for the decryption, it tells where plaintext ends, and the rest, the appended part of the key (random bits) is ignored, yet you have not used up the entire key. For increased usability: Re-use keyfile. No not, what it sounds like. It8217S a ONE-TIME pad, I know. you won8217t reuse any parts of the key. Consider this: You meet your contact only once in a year. You have no idea how many messages you will exchange and how big each one will be. you could think and think and ask the stars, and then create many differently sized keyfiles, some of which you might never use at all. What if instead of this, you simply exchange TWO single files of keydata ( contact1ToContact2.date1.key and contact2ToContact1.date1.key ) of, say, 500GB Now, each time you encrypt something with that key, your encryption uses len(plaintext)len(randomPadding) of the key file, and marks that part as used. Either by saving the remaining part of it into a copy contact1ToContact2.date2.key or by changing a counter a counter in the keyfile itself. How can you decode old messages then or if they arrive out of order In that case, i think, the implementation with the marker is better than the one copying the remaining version. Now when you encrypt a message, you read the out from the beginning of the file the stored index of currently first still unused bit of key material. you include this information in the cypher message, and start encrypting form that position. When finished, you update the counter in the beginning of the keyfile. That way, when you encrypt the next message, you do not reuse any key material, but also no key material is wasted. And if you want to decrypt even older messages you sent yourself, of which you don8217t have a copy of the plain text anymore, you still have the key material (as it was not deleted) and the counter that gives you the start position of the used key material from the key file is included in the cypher text. that was Of course, one could argue, that keeping used key material for long, increases the chance of your home being raided and the key be found and old messages be decrypted. But for many, this scenario is just unlikely, and for those who fear it, include a simple function that takes the keyfile and deletes all key material prior to the position specify in the current index. If cypher texts are not delivered instantly, there could be messages be moving from Alice to Bob and from Bob to Alice simultaneously. In order to prevent them from using the same key material, they should use one keyfile only for encryption, the other only for decryption. (What Alice uses for encryption, Bob uses for decryption, and vice-versa) Decryption does exactly what it does in your current implemtnetion, except three things: 1: It reads from the cyphertext the index of the key material that was used 2: It does not start at the beginning of the keyfile, but at the given index 3: it stops decryption when the marked for end of plain text was found during decryption Yes, that is a bit more complex, but would make the entire program pretty neat and usable, I think. your license does not allow redistribution of modifications. maybe you cold release it ( optionally additionally) under GPL or another free open source license.

No comments:

Post a Comment