Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Implementing Cryptography Using

Python Shannon Bray


Visit to download the full and correct content document:
https://ebookmass.com/product/implementing-cryptography-using-python-shannon-br
ay/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Bayesian Optimization: Theory and Practice Using Python


1st Edition Peng Liu

https://ebookmass.com/product/bayesian-optimization-theory-and-
practice-using-python-1st-edition-peng-liu/

Python Programming: Using Problem Solving Approach 1st


Edition Reema Thareja

https://ebookmass.com/product/python-programming-using-problem-
solving-approach-1st-edition-reema-thareja/

Machine Learning on Geographical Data Using Python 1st


Edition Joos Korstanje

https://ebookmass.com/product/machine-learning-on-geographical-
data-using-python-1st-edition-joos-korstanje/

Data-Driven SEO with Python: Solve SEO Challenges with


Data Science Using Python 1st Edition Andreas Voniatis

https://ebookmass.com/product/data-driven-seo-with-python-solve-
seo-challenges-with-data-science-using-python-1st-edition-
andreas-voniatis/
Introduction To Computing And Problem Solving Using
Python 1st Edition E. Balaguruswamy

https://ebookmass.com/product/introduction-to-computing-and-
problem-solving-using-python-1st-edition-e-balaguruswamy/

Introduction to Responsible AI: Implement Ethical AI


Using Python 1st Edition Manure

https://ebookmass.com/product/introduction-to-responsible-ai-
implement-ethical-ai-using-python-1st-edition-manure/

Bayesian Optimization : Theory and Practice Using


Python Peng Liu

https://ebookmass.com/product/bayesian-optimization-theory-and-
practice-using-python-peng-liu/

eTextbook 978-0134379760 The Practice of Computing


Using Python (3rd Edition)

https://ebookmass.com/product/etextbook-978-0134379760-the-
practice-of-computing-using-python-3rd-edition/

Introduction to Computation and Programming Using


Python, Third Edition John V. Guttag

https://ebookmass.com/product/introduction-to-computation-and-
programming-using-python-third-edition-john-v-guttag/
Implementing
Cryptography Using
Python®
Shannon W. Bray
Published by
John Wiley & Sons, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com

Copyright © 2020 by John Wiley & Sons, Inc., Indianapolis, Indiana


Published simultaneously in Canada

ISBN: 978-1-119-61220-9

ISBN: 978-1-119-61222-3 (ebk)

ISBN: 978-1-119-61545-3 (ebk)

Manufactured in the United States of America

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted
under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission
of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clear-
ance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the
Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111
River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/
go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or war-
ranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all
warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be
created or extended by sales or promotional materials. The advice and strategies contained herein may not
be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in
rendering legal, accounting, or other professional services. If professional assistance is required, the services
of a competent professional person should be sought. Neither the publisher nor the author shall be liable for
damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation
and/or a potential source of further information does not mean that the author or the publisher endorses
the information the organization or website may provide or recommendations it may make. Further, readers
should be aware that Internet websites listed in this work may have changed or disappeared between when
this work was written and when it is read.

For general information on our other products and services please contact our Customer Care Department
within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included
with standard print versions of this book may not be included in e-books or in print-on-demand. If this book
refers to media such as a CD or DVD that is not included in the version you purchased, you may down-
load this material at http://booksupport.wiley.com. For more information about Wiley products, visit
www.wiley.com.

Library of Congress Control Number: 2020940306

Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc.
and/or its affiliates, in the United States and other countries, and may not be used without written permis-
sion. Python is a registered trademark of Python Software Foundation. All other trademarks are the property
of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned
in this book.
To Stephanie, Eden, Hayden, and Kenna,
with all my love, for making each and every day special.
About the Author

Shannon W. Bray started his career in information technology in 1997 after


being honorably discharged from the United States Navy. He started his IT
career working on programmable logic controllers out in the Gulf of Mexico
and then started writing business applications using various technologies until
2000 when .NET was first released; since then, the languages of choice have
been C++, C#, Windows PowerShell, and Python. From there, Shannon worked
on writing software until he started working with Microsoft SharePoint. The
Microsoft stack of technologies forced Shannon out of just writing code into
building large secure solutions. Shannon’s career has taken him to engagements
all over the world where he has worked with a number of U.S. government
agencies. Shannon became interested in cryptography while pursuing a master’s
degree in cybersecurity, and he has continued to research cryptography and
cybersecurity as he pursues a PhD in computer science.
Shannon has earned the following certifications: Microsoft Certified Master,
Microsoft Certified Solutions Master, Certified Information Security Manager
(CISM), Security+ (Plus), the CompTIA Advanced Security Practitioner (CASP+),
and a number of other industry certifications. In addition to writing, Shannon
speaks nationally at technology conventions and works as a mentor teaching
technology to youth programs.
Shannon lives in the Raleigh, North Carolina, area with his wife, Stephanie,
two daughters, Eden and Kenna, and son, Hayden. During the dive season,
Shannon enjoys diving off the coast of North Carolina. During the rest of the
year, Shannon works on IT projects around the house that utilize single-board
computers and, most often, propellers. He is currently building a home security
system that uses Python, cryptography, and drones. As of the release of this

v
vi About the Author

book, Shannon is currently running for the U.S. Senate for the state of North
Carolina to help bring cybersecurity issues to the mainstream and to help people
understand the importance of end-to-end encryption.
Shannon can be contacted through LinkedIn at www.linkedin.com/in/
shannonbray.
Acknowledgments

While this is my third book, every book comes with its own set of challenges.
Completing a book is not always a fun project but does become a labor of love.
As soon as you start, life has a way of throwing changes at you, and it seems
that you never have the time that you thought you would have. Shortly after
starting this book, I started a PhD program with the Missouri University of
Science and Technology and transitioned through a number of government
contracts, ran for political office, and then became a work-from-home teacher
as the world battled a global pandemic. I knew that the editing team would be
earning their pay with whatever I put together. That team has been wonderful
with their feedback and responsiveness. Specifically, I’d like to thank the follow-
ing people on the Wiley team: Barath Kumar Rajasekaran, production editor;
Jim Minatel, acquisitions editor; Pete Gaughan, content enablement manager;
Brent Cook and James Langbridge, technical editors, and, most importantly,
Kim Wimpsett, the project editor. Kim did her best to keep me on schedule, but
I found new ways to miss a few deadlines.

vii
Contents at a Glance

Introductionxvii
Chapter 1 Introduction to Cryptography and Python 1
Chapter 2 Cryptographic Protocols and Perfect Secrecy 31
Chapter 3 Classical Cryptography 65
Chapter 4 Cryptographic Math and Frequency Analysis 95
Chapter 5 Stream Ciphers and Block Ciphers 139
Chapter 6 Using Cryptography with Images 171
Chapter 7 Message Integrity 199
Chapter 8 Cryptographic Applications and PKI 223
Chapter 9 Mastering Cryptography Using Python 247
Index277

ix
Contents

Introductionxvii
Chapter 1 Introduction to Cryptography and Python 1
Exploring Algorithms 2
Why Use Python? 2
Downloading and Installing Python 3
Installing on Ubuntu 4
Installing on macOS 4
Installing on Windows 4
Installing on a Chromebook 4
Installing Additional Packages 5
Installing Pip, NumPy, and Matplotlib 6
Installing the Cryptography Package 7
Installing Additional Packages 8
Testing Your Install 9
Diving into Python Basics 9
Using Variables 10
Using Strings 11
Introducing Operators 11
Understanding Arithmetic Operators 11
Understanding Comparison Operators 13
Understanding Logical Operators 13
Understanding Assignment Operators 14
Understanding Bitwise Operators 15
Understanding Membership Operators 15
Understanding Identity Operators 16

xi
xii Contents

Using Conditionals 16
Using Loops 17
for17
while18
continue18
break18
else18
Using Files 19
Understanding Python Semantics 20
Sequence Types 20
Introducing Custom Functions 26
Downloading Files Using Python 27
Introducing Python Modules 28
Creating a Reverse Cipher 29
Summary30
Chapter 2 Cryptographic Protocols and Perfect Secrecy 31
The Study of Cryptology 32
Understanding Cryptography 32
Cryptography’s Famous Family: Alice and Bob 33
Diffie-Hellman34
Data Origin Authentication 34
Entity Authentication 35
Symmetric Algorithms 36
Asymmetric Algorithms 36
The Needham-Schroeder Protocols 36
The Otway-Rees Protocol 38
Kerberos39
Multiple-Domain Kerberos 40
X.50941
Formal Validation of Cryptographic Protocols 46
Configuring Your First Cryptographic Library 47
Understanding Cryptanalysis 47
Brute-Force Attacks 47
Side-Channel Attacks 48
Social Engineering 48
Analytical Attacks 48
Frequency Analysis 48
Attack Models 49
Shannon’s Theorem 50
One-Time Pad 51
XOR, AND, and OR 51
One-Time Pad Function 56
One-Way Hashes 58
Contents xiii

Cryptographic One-Way Hashes 59


Message Authentication Codes 60
Perfect Forward Secrecy 60
Published and Proprietary Encryption Algorithms 61
Summary62
References62
Chapter 3 Classical Cryptography 65
Password Best Practices 66
Password Storage 66
Hashing Passwords 67
Salting Passwords 67
Stretching Passwords 68
Password Tools 68
Obfuscating Data 69
ASCII Encoding 70
Base64 Encoding Text 70
Binary Data 72
Decoding72
Historical Ciphers 72
Scytale of Sparta 73
Substitution Ciphers 73
Caesar Cipher 74
ROT-1376
Atbash Cipher 77
Vigenère Cipher 77
Playfair79
Hill 2x2 83
Column Transposition 87
Affine Cipher 90
Summary93
Chapter 4 Cryptographic Math and Frequency Analysis 95
Modular Arithmetic and the Greatest Common Devisor 96
Prime Numbers 97
Prime Number Theorem 98
School Primality Test 98
Fermat’s Little Theorem 100
Miller-Rabin Primality Test 100
Generate Large Prime Numbers 104
Basic Group Theory 106
Orders of Elements 107
Modular Inverses 109
Fermat’s Little Theorem to Find the Inverse 110
Extending the GCD 111
Euler’s Theorem 111
xiv Contents

Pseudorandomness115
Breaking C’s rand() Function 116
Solving Systems of Linear Equations 117
Frequency Analysis 120
Cryptanalysis with Python 123
Using an Online Word List 125
Determining the Frequency 126
Breaking the Vigenère Cipher 129
Summary138
Chapter 5 Stream Ciphers and Block Ciphers 139
Convert between Hexdigest and Plaintext 140
Use Stream Ciphers 141
ARC4147
Vernam Cipher 148
Salsa20 Cipher 149
ChaCha Cipher 151
Use Block Ciphers 156
Block Modes of Operations 158
ECB Mode 158
CBC Mode 159
CFB Mode 160
OFB Mode 162
CTR Mode 163
Tricks with Stream Modes 164
DIY Block Cipher Using Feistel Networks 165
Advanced Encryption Standard (AES) 167
Using AES with Python 167
File Encryption Using AES 169
File Decryption Using AES 169
Summary169
Chapter 6 Using Cryptography with Images 171
Simple Image Cryptography 171
Images and Cryptography Libraries 174
Understanding the Cryptography Library 174
Understanding the Cryptosteganography Library 175
Image Cryptography 175
File Cryptography Using Fernet 176
Image Cryptography Using Fernet 179
AES and Block Modes of Operations 180
Exploring a Simple ECB Mode Example 181
Exploring a Simple CBC Mode Example 185
Applying the Examples 186
Steganography187
Storing a Message Inside an Image 188
Contents xv

Storing a Binary File Inside an Image 192


Working with large images 195
Summary197
Chapter 7 Message Integrity 199
Message Authentication Codes 200
Hash-based Message Authentication Code 201
Using HMAC to Sign Message 202
Message Digest with SHA 203
Binary Digests 204
NIST Compliance 205
CBC-MAC206
Birthday Attacks 207
Crafting Forgeries 209
The Length Extension Attack 209
Setting Up a Secure Channel 210
Communication Channels 211
Sending Secure Messages over IP Networks 212
Create a Server Socket 212
Create a Client Socket 213
Create a Threaded Server with TCP 214
Adding Symmetric Encryption 215
Concatenate Message and MAC 218
Summary221
References222
Chapter 8 Cryptographic Applications and PKI 223
The Public-Key Transformation 224
Exploring the Basics of RSA 226
Generating RSA Certificates 229
Constructing Simple Text Encryption and
Decryption with RSA Certificates 231
Constructing BLOB Encryption and
Decryption with RSA Certificates 232
The El-Gamal Cryptosystem 235
Elliptic Curve Cryptography 238
Generating ECC Keys 240
Key Lengths and Curves 241
Diffie-Hellman Key Exchange 242
Summary245
Chapter 9 Mastering Cryptography Using Python 247
Constructing a Plaintext Communications Application 248
Creating a Server 248
Creating the Client 250
Creating the Helper File 251
Execution252
xvi Contents

Installing and Testing Wireshark 253


Implementing PKI in the Application Using RSA Certificates 255
Modifying the Server 256
Modifying the Client 257
Modifying the Helper File 258
Execution259
Implementing Diffie-Hellman Key Exchange 261
Modifying the Server File 262
Modifying the Client File 264
Modifying the Helper File 266
Creating the Diffie-Hellman Class File 270
Execution275
Wrapping Up 276
Index277
Introduction

I initiated my journey into cryptography while studying for my undergrad. Most


of the cryptography concepts I learned were based on what one would need for
their CISSP or Security+ exams. Most of my understanding was at a high level,
and it was difficult to remember the more intricate aspects until cryptography
became a primary focus.
It wasn’t until I started my master’s in cybersecurity that I began applying
cryptographic features within a scripting environment. The concepts in this
book will help you advance your knowledge and experience as you dig deeper
into understanding the use of cryptography in Python.
Over the past few years, several governments have discussed legislation that
will ensure that any form of communication, whether it’s an email, text message, or
video chat, can always be read by the police or intelligence services if they have a
warrant. Governments are putting pressure on technology companies to give them
backdoor access or the keys to the kingdom so that they can keep the country safe.
The fight between lawmakers and encrypted messaging platforms has entered
new territory. Imagine a world where the government has seized the oppor-
tunity to scan every electronic message by government-approved scanning
software. The privacy and security of all users will suffer if law enforcement
agencies achieve their dream of breaking cryptosystems. Proponents of end-to-
end encryption, like Microsoft, Facebook, and Google, may lose their campaign
to maintain user security as a priority.
We have all heard of times when it would be beneficial for encrypted data
to magically become readable; this is often related to criminal cases. Should
criminals be allowed to plot their plans in secret? Where does the right to our
privacy start? In reality, there are technical and legal issues with allowing gov-
ernments to do this; this of course will be strongly opposed by technology and

xvii
xviii Introduction

privacy advocates. The world is at war on what can be encrypted, what should be
encrypted, and who should have the keys to unlock someone else’s encryption.
Whether you agree or disagree with what powers a nation-state should have
over encrypted communications in their country, you should understand what
encryption is, how to apply it when needed, and how to ensure that the data
you are receiving is authentic and confidential. Over the course of this book,
you will get a basic understanding of how to cryptographically secure your
messages, files, or Internet traffic using easy-to-understand Python recipes that
have been created or updated to support Python 3.

What This Book Covers


This book focuses on helping you pick the right Python environment for your
needs so that you can hit the ground running. You will get an understanding
of what algorithms are and explore the basics of Python.
Once you have an idea of where you are starting from, you will get an over-
view of what cryptography is, what perfect secrecy means, and the history of
cryptography and how its use changed our world.
To get a full understanding of some of the cryptographic concepts, a little
math is needed. You will get an understanding of how prime numbers, basic
group theory, and pseudorandom number generators help build cryptographic
solutions. This will build the foundation for understanding various stream and
block ciphers and highlight some of their encryption modes and weaknesses.
Every cryptographic discussion is better with pictures, so we will spend a
chapter focusing on how image cryptography and steganography work. We’ll also
highlight a few issues that you will need to be aware of while dealing with images.
Message integrity is just as important as message secrecy. Knowing who sent
the message to you directly relates to whether the message is credible. You will
learn how to generate message authentication codes to ensure integrity during
transit.
The strength of encryption will be shown at the end of the book when you
will learn about PKI schemes and explore how to implement elliptic curve cryp-
tography in an application. The application you build will exchange data in a
highly secure format over an unsecure channel, thus ensuring that you are able
to control your own end-to-end encryption scheme that no one will be able to
decrypt without the keys you create. I hope you find the journey as fun as I did.
Another random document with
no related content on Scribd:
Me tahdomme tajuta
vain oman Sielumme tuosta joukosta.

Voi meitä, me elämän muukalaiset, ellemme Sieluamme


löydä! Etsiä meidän täytyy iankaikkisesta iankaikkiseen,
hapuilla meidän täytyy äänettömässä pimeydessä, aina yksin
— vaikka miljoonilla on sama taival. Me riudumme vähitellen,
emmekä kuole; me palamme loppuun, mutta vaelluksemme
jatkuu; etsintä tappaa meidät, eikä kuitenkaan voi vapauttaa
olemisen tuskasta.

Voi meitä, joilla tietoisesti on Sielu!


PHANTASIA

PHANTASIA

Hän kulkee keijuisaskelin,


hän vilkuttaa, hän hymyää,
yö-silmin tummin, kiehtovin
sua matkaan kiirehtää.

Hän vaiti viittaa sormellaan.


Et jäädä voi, sa mukaan käyt
pois, ohi tutun, vihreen Maan.
Saat silmiis oudot näyt.

Näät luomisihmeen sisimpään:


sun oma sielus auki on,
se on kuin lapsi syntyissään,
niin puhdas, tahraton.

Muu ympäriltäs katoaa:


tää tärkein on, sen tiedät nyt.
Ongelma elon ratkeaa:
oot itses löytänyt.
Vain hetkinen, sa havaitset
kuin sumuun kaiken haihtuvan —
pois, kauas keijuisaskelet
jo käy Phantasian.

Hän kulkee kautta maailman,


hän viivähtää, hän hymyää
ja näyttää Toden ainoan
— vaan luokses ei hän jää.

VANHA SATU

»Oli kerran kyttyräselkä prinsessa —»


Näin alkoi lapsuuteni surullisin satu.
Lienet kuullut sen kauan sitten, Jessica?

Näin edessäni soikeat enkelikasvot,


siniset silmät ja kultatukan
— ja ruman, ruman kyttyrän.

Kuningas ja kuningatar säälivät poloistaan.


Hän sai katsella itseään vain pikkuruisesta peilistä,
ja hän näki vain kauneutensa.

Siniset silmät keksivät kerran prinssin, niin nuoren ja uljaan,


ah! Siniset silmät tähtinä tuikkivat, enkelikasvoille nousi vieno
punerrus ja kultatukka aurinkona paistoi.
Mutta prinssi, hän näki vain ruman kyttyräselkä prinsessan,
nauroi — ja meni tiehensä.

Jessica, sattuuko tämä vanha satu sinuun? Eikö liene


joskus Joku, jonka olisi pitänyt pysähtyä, kulkenut outona
ohitsesi?

Jessica,
sattuuko tämä vanha satu sinuun?
Eikö liene jokaisella meistä oma kyttyrämme,
jonka huomaa juuri hän,
jonka tulisi katsoa vain sielumme enkelisilmiin?

DRYADI

Kaukana, kaukana seetripuu tummaan virtahan kuvastuu.

Käy rannalla huntujen huiske, helisee ilo, hilpeä


kuiske, nyt kukkaskeijuset karkeloi. Vedenneitoset
nousevat mukaan, pois piiristä ei jää kukaan, kun
Ahdin kantele tanssiin soi.

***

Verkkaan, verkkahan seetripuu kuulee, herää ja —


avautuu.

On kuin säihkyisi tummat silmät lehvien alta, on kuin


neitonen astuisi esiin, hento kuin kukka, kuin haihtuva auer,
katsoisi syviin vesiin.
Ahdin kantele soi ja soi, viita ja ranta unelmoi,
keijujen karkelo käy yli vehreän maan.

Silmät tummat, syvät, kyynelkosteat virran kalvoon haavein


katsovat, huulet armaat hiljaa kuiskaavat:

Vierii vuodet, vierii vuosisadat, puuni vankina ma


yhä oon, juuret sen käy aina syvemmälle, latvus
kohoo ylös aurinkoon.

Rakas on se mulle, elämäni on se,


kun se kuolee, kuolen itsekin,
haihdun, kastehelmi, aamun heloon,
niin on elon määrä dryadin.

Tiedän tään ja sentään tahdon, pyydän:


tule, turma, tuho puulle tuo!
Kahleet multa katkee, irti pääsen
kaikkeuteen, Kaivattuni luo.

Virralla kerran venho kiikkui,


Ihmisen. Lapsi purjeessaan.
Kuohahti aalto — hän oli poissa —
Missä mä kaivatun kohdata saan?

Ihmiset toinen toisensa jälkeen


syntyvät, kuolevat. Miksikä, oi?
Mistä he tulivat? Minne he menevät?
Luonto ei mulle vastata voi.

Virralla kerran venho kiikkui,


Ihmisen sieluhun katsoa sain.
Hän oli poissa — polttava kaipuu,
etsinnän pakko jäi mulle vain.

***

Ahdin kantele vaikenee. Keijuiskarkelon huiskavat hunnut


viidakon varjoon, lehtojen kätköön, aaltojen helmaan
pakenee.

— Verkkaan, verkkahan astuu neito lehvien alle,


tummat silmät kuin uni häipyvät, haihtuvat.

Kultainen viiru piirtyvi aamun taivahalle.

***

Kaukana, kaukana seetripuu päivän nousuhun havahtuu.

VINETAN KELLOT

Pium, paum, pium, paum —

Kuuletko? Allamme meressä kellot soivat kuolleen


kaupungin. Kerran aamulla kauan, kauan sitten uppos se
aaltoihin.

Pium, paum, pium, paum -—


Syvällä, syvällä sinisen ulapan alla Vinetan kellot lyö,
malmiset kellot ylitse hautain, joita ympäröi äänetön yö.

Pium, paum, pium, paum -—

II

Mun sydämeni, ystävä, lie meri äärtä vailla, et sinä enkä minä
rantaa nähdä voi, ja syvyydessä uponneitten kirkonkelloin
lailla, ah, vanhat laulut malmisoinnun soi.

Ah, ystäväni, kuuletko? Noin synnyinkellot soittaa,


hopeisin äänin riemuviestin julki tuo.
Laps kasvaa, varttuu, ihanimman elon arvan voittaa,
ja kultakielin helkkyy sävelvuo.

Ah, ystäväni, kuuletko? Käy äänet hautakelloin


kuin musta joutsenparvi soiluis yli veen,
ja raskaat laineet vaahtoisina kuohuten ja velloin
löis rantakiviin, raukeis hiljalleen.

Mun sydämeni, ystävä, lie meri äärtä vailla, et sinä enkä


minä rantaa nähdä voi, ja syvyydessä uponneitten
kirkonkelloin lailla, ah, vanhat laulut malmisoinnun soi.

MELANKOLIA

Sano, mistä mun luokseni löydät tien,


Alakuloisuus, sisarein?
Sinä hiivit vierellein,
sinä seuraat mua, jos missä mä lien.

Oli äsken niin riemukas mieleni mun,


valonvälkkeessä mailman näin,
elon kaunihin edessäin
— mua hiljaa kosketti kätesi sun.

Oli niinkuin murheiset säveleet


olis helisseet korvissain:
»Elon onni on harhaa vain»
— Sain silmiini kuumat kyyneleet.

Sano, miksi mun luokseni etsit tien,


Alakuloisuus, sisarein?
Sinä hiivit vierellein,
sinä seuraat mua, jos missä mä lien.

LEHMUSSATU

Sinä muistatko vanhaa puutarhaa, missä lumottu prinsessa


vaeltaa? Tule, etsimme sen! Yli korkean muurin niinipuu
satavuotisin oksin kaareutuu. Suhu lehmusten soi niinkuin
nyyhkytys kaukainen.

Kas, nuorin prinsessa Unten Maan


hän sadusta satuun haaveissaan
eli leikkien.
Niin kerran keskellä karkelon
Tosi tielleen sai — satu lopussa on.
Suhu lehmusten
soi niinkuin nyyhkytys kaukainen.

Kuin kastehen aurinko haihduttaa, unet prinsessan sielusta


karkoittaa valo totuuden. Hän herää ja outona itselleen ja
muille hän pyrkii selvyyteen. Suhu lehmusten soi niinkuin
nyyhkytys kaukainen.

Sukupolvet syntyy ja harmaantuu, ja linna ja puutarha


sammaltuu, jää unheesen. Tuhatvuotias varmaan prinsessa
lie, ohi portin on kulkenut kaikkien tie. Suhu lehmusten soi
niinkuin nyyhkytys kaukainen.

———

Käsivarsiin kätken polttavan pään, kuin unessa Ihmisen


ongelman nään ja arvaan sen: kukin meistä sisinnä
sielussaan on etsivä lapsonen Unten Maan. Suku ihmisten
ohi varjoina käy läpi vuosien.

Sinä muistatko vanhaa puutarhaa,


missä lumottu prinsessa vaeltaa?
Ah, löysimme sen:
sydän jokainen, joka rakkauteen
ja hyvään uskoo ja kauneuteen
ja ikuisen
sai synnyinlahjaksi Kaipauksen,

jok' ei sammua voi, ei raueta saa.


Vuosmiljoonat etsien hän vaeltaa
kunis kerran, oi,
käsi voimakas portit auki lyö,
toden-etsijän päättyy pitkä yö
ja koittaa koi.
Avaruuksien harput riemua soi.

Joka ihminen lumottu puutarha on, paras hänessä pyrkii


valohon — hän kätkee sen. Yli hautojen pian niinipuu
satavuotisin oksin kaareutuu. Suhu lehmusten soi niinkuin
nyyhkytys kaukainen.
NUORET KOTKAT

NUORET KOTKAT

Me nostamme näin, ah, katseemme kirkasta, ihanaa Päivää


päin. Ovat siipemme heikot ja hennot, ne vielä ei kannata
meitä, toki mielemme kauas, kauas jo kulkevi outoja teitä. Ja
me aavistamme, sen veremme sanoo: on kerran eessämme
kotkan-lennot.

Me nostamme näin maan tomusta sielumme ihanaa Päivää


päin. Jo tunnemme: siipemme nuoret ovat voimakkaat, ne
kantaa voi äärettömyyksihin loitos, päin etäistä unelma-
rantaa. Ja me aavistamme, sen veremme sanoo: on kotkain
määränä korkeimmat vuoret.

Me nousemme näin, ah, lennossa ylitse seutujen


kimmeltäväin. Maa aamussa allamme hohtaa, se enää ei
kahlitse meitä. Yhä kauemma siipemme kantaa, yhä ylemmä
aurinko-teitä. Ja me aavistamme, sen veremme sanoo: ylös,
ain ylöspäin, kunnes kuolema kohtaa.
TIELLÄ

Kätes hetkeksi mulle suo:


päämääräni selvänä on.
Mua viittoo suuri Tuntematon.
Jo huominen lähdön tuo.

Hyvä luon' olis armahan,


syli turvaisa lemmen sois,
ja huolien varjotkin viihtäis pois
kajo lieden rattoisan.

Sydän tahtoisi viivähtää:


tie pitkä ja vaikea on,
se johtavi suoraan aurinkohon
ja se sielua peljättää.

Sydän tahtoisi viivähtää,


vaan pakko on luotasi pois,
on kuin joku kello kutsuen sois,
se matkahan kiirehtää.

Kätes, ystävä, hetkeksi suo:


tie pitkä ja vaikea on.
Vaan suunta on suoraan aurinkohon
— ja huominen lähdön tuo.

SIIPIRIKKO
Jo lentoon ovat toiset lähteneet.
Se suurin, surullisin silmin yksinänsä
on pesään jäänyt kera ikävänsä,
vain vaivoin liikkuu siivet katkenneet.

— Mun mieleni, ah, kauas täältä ois!


Miks siivet eivät kanna niinkuin muiden?
Mua kutsuu kesä, tuulet, humu puiden —
Mun täytyy, täytyy päästä täältä pois!

Jo toiset liitää teillä tuulien,


ylitse maiden, ulapoiden aavain —
mun ikäväni syvemmäksi saa vain,
kun vähenevät voimat siipien.

Ei ruumistain ne nosta lentohon,


mut sieluni on nuori, terve, vapaa,
se maasta kohoo, esteitä ei tapaa,
se kenties määrän saavuttava on. —

Jo lentoon ovat toiset lähteneet.


Voi sitä, joka yksin pesähänsä
jäi voimatonna kera ikävänsä,
voi sitä, jolt' on siivet katkenneet.
NEBOLLA

Ken Nebolla kerran seissyt on ja nähnyt Luvatun Maan, siit


alkaen on kulkiain ja vieras päällä maan.

Ken Nebolla kerran seissyt on, hän on nähnyt kohtalon,


joka suuri on, joka kaunein on ja — saavuttamaton.

RUKOUS

Suutele minua, Aurinko!

Olen ihmisten rakentamissa kaupungeissa unohtanut sinut,


isäni. Olen kääntänyt selkäni sisar Vedelle, veljeni Tuuli on
minua peloittanut rajuudellaan, sisartani Ilmaa olen epäillyt, ja
kauan sitten jo halveksin emoani Maata.

Suutele minua, Aurinko!


Pakoita veri, viileä, sairas veri suonissani
virtaamaan lämpimänä ja nopeasti.
Opeta minut tuntemaan sisareni ja veljeni,
ja ah, isä Aurinko,
saata minut jälleen rakastamaan maata,
joka helmastaan on minut kutsunut esiin,
joka myös on minut takaisin omakseen ottava.

Olen ihmisten rakentamissa kaupungeissa unohtanut


omani, siksi suutele minua kauan, Aurinko!
KELTAISIA LEHTIÄ

KELTAISIA LEHTIÄ

Eivätkö olekin keltaiset lehdet ihania, ystäväni? Ne kertovat,


että niin paljon on ohi, että laululinnut pakenivat kylmää, että
kirjavat kukat pudottivat terälehtensä, että elonkorjuun aikakin
on jo mennyt, ja ensimmäinen rakkaus on sammunut.

Katselen syksyistä maisemaa ja näen sen kehystäminä


ystävän kasvot, joita hämärä verhoaa, niin että eroitan vain
silmät, tummat ja surulliset ja rauhalliset kuin yö, joka
synnyttää kaipauksen ikuiseen lepoon.

Ystävä, kesän aika on mennyt. Hetki on tullut


muuttolinnuille lähteä ja kellastuneille lehdille pudota ja
muuttua maaksi ravitsemaan uutta elämää. Siinä ei ole
mitään murehdittavaa, siksi ne pukeutuvatkin loistaviin
väreihin ja hymyilevät syksyn kalsealle auringolle tuulen
temmatessa ne kuolettavaan syleilyynsä. Siinä ei ole mitään
murehdittavaa, sillä maan päällä on kaikella aikansa, aika
syntyä ja aika kuolla.

Katson syksyistä maisemaa ja näen vain ystävän silmät,


surulliset ja syvät kuin yö —

II

Ystävä, tulin luoksesi lahjoineni, maljoistani kallisarvoisin


kädessäni helmeilevää viiniä täynnä. Ojensin sen sinulle
juodaksesi. Sinä katsoit siihen viisaine silminesi ja työnsit sen
pois.

Ystävä, tulin luoksesi lahjoineni.


Ojensin sinulle kaiken, mitä minulla oli.
Suo anteeksi, ettei lahjani kelvannut sinulle.

Olin vaeltanut pitkän matkan enkä ymmärtänyt peittää


maljaa viitallani. Pölyä oli kohonnut siihen, sade oli ryvettänyt
pinnan kiillon ja tuuli oli lennättänyt kellastuneita lehtiä viiniin.
Siksi sinä katsoit lahjaani viisaine silminesi ja työnsit sen pois.

Suo anteeksi, ettei parhaani ollut sinun arvoisesi, mutta


minulla ei ollut muuta.

III

Eräänä päivänä olet tunteva ahdistuksen rinnassasi.


Kirkkaalle otsallesi on nouseva pilvi. Selkeä ajatuksesi on
harhaileva pimeässä labyrintissä. Jokin sinussa muistelee
jotakin mennyttä, joka oli ehkä elämäsi Kaikkein Tärkein,
mutta jota et uskaltanut ymmärtää.

Eräänä päivänä olet tunteva ahdistuksen rinnassasi. Ja kun


ensimmäiset keltaiset lehdet putoavat ja syyskostea maa on
musta ja liejuinen, muistat sinä: kerran suutelit pientä tyttöä
kyynelkasteisten kuusien alla värisevin huulin — tuhat vuotta
sitten.
PUNAISIA LEHTIÄ

KIRJOITTAMATON LAULU

Tahdoin kirjoittaa laulun rakkaudesta, kaikesta, mitä sen-


nimellistä olin nähnyt, kuullut tai aavistanut.

Tahdoin kirjoittaa laulun rakkaudesta, mutta ystävä, joka


minut tunsi, sanoi: »Sinä et sitä voi, koska et vielä ole
rakastanut muita kuin itseäsi.»

— Kirjoitin lauluni.
Ystäväni luki sen ja — itki.

»Tämä on totta», sanoi hän,


»tällaistakin on rakkaus,
eläimellistä, raakaa ja rumaa
— tätä me sanomme rakkaudeksi.»

» Tämäkin on totta», sanoi hän, joka oli elänyt sen itse,


»mutta tämä ei ole ihmistä varten. Etkö todellakaan löydä
muuta?»
Ja minä hymyilin hänelle, sillä olin löytänyt muutakin, vaan
en voinut siitä kertoa. Olin uneksinut yöllä rakkaudesta, joka
oli kuin taru Eedenin ajoilta, mutta — olin unohtanut uneni.

Minä hymyilin hänelle, sillä tiesin: Olen kerran kirjoittava


laulun, suloisen kuin lapsuuteni kukkaniitty, lempeän kuin
kotijärveni aaltojen loiske, puhtaan kuin talven ensi lumi,
toden kuin hyvä Jumala itse — Olen kerran kirjoittava laulun,
parhaani, jos jälleen näen saman unen.

KAUNEIN LAULU

Kaunein lauluni syntyy, sitä sykkii sydämeni, sitä vereni


kohisee. Kaunein lauluni syntyy, vaan en voinut aavistaa, että
se näin raskasta on: minä näännyn siihen.

Luulin kirjoittavani kauneimman lauluni paperille,


säännöllisin, selvin kirjaimin
suorille riveille.
Luulin saavani tuntea luomisen iloa,
riemuisaa ja kohottavaa,
ja olenkin kuin erämaan kasvi,
jonka nesteet aurinko kuivaa,
jonka ympärillä polttava hietikko leviää,
kuolemaan tuomittu ennen kukintaa.

Sillä nyt tiedän:

You might also like