Showing results for 
Search instead for 
Did you mean: 

Community Helping Community

Python Cryptography Background for CiscoLive DevNet Sessions 1040, 1041 and 1042

Cisco Employee

Python Cryptography Background for CiscoLive DevNet Sessions 1040, 1041 and 1042

Greetings DevNet 1040,1041 and 1042 session participants!

  I wanted to provide some additional background on cryptography that you can take a look at before, (or even after our sessions) at CiscoLive.

I’ve added a folder called "Part IV DevNet Sessions/Crypto Background” to the existing Python background material.  You can find it here:


There are seven videos with code examples, (almost 2.5 hours of content) focused on cryptography.  I’ve also updated the 'getting_started_contents.xlsx' spreadsheet in the main folder with a ‘crypto tab’ that explains what's out there.

   We will be demonstrating some examples of encryption using the Python ‘pycrypto’ module.  Pycrypto is one of the most popular crypto modules available and one of the more frequent PyPi repository downloads.

The code that we will base our examples on was taken from an excellent example tutorial called “Python  Encryption Tutorial with Pycrypto’ by Sentdex.  I've included the source ( in the CiscoLive code example folders but it can also be found here:

There’s also a good youtube video that explains the code available here:

  The purpose of the videos and code samples that we’ve uploaded is to break down/decompose most of the program elements into it's  constituent parts.  The content is intended to provide some additional background information on concepts like:

     - Installing pycrypto in Windows environments

     - Demonstration of ‘compiling’ a python program (turning a .pyc file into a windows .exe file)

     - Base64 encoding

     - Python lambdas

     - How the AES algorithm works  - I.e. the various AES block modes of operation, implications of key size selection, making sense out

       of the programs block PADDING scheme, etc.,etc

   If your comfortable with the original code and video that was provided by Sentdex (both are excellent btw;), then please don’t bother with the content.

  If, on the other hand, you’d like to get a little more detail (perhaps from a different perspective) about how the code works or are interested in understanding some additional background about the AES cipher (and various design choices to consider when using it), then please, help yourself!

  If your not sure where to begin, then start out watching the last video module 7 called ‘Putting it all together’.  This just dissects the program code step by step. Each element of the program has a video/code example that drills down from there.

  I’m looking forward to our DevNet sessions at CiscoLive and again, if I can help with any of the content, (before or after the sessions),or if you’d like to provide some guidance, feedback or personal insights of your own please feel free to comment below!




looks good , video link didnt work though

Cisco Employee


The youtube video link doesn't work or the cliscolive box repository link?  I just tried both of them


here is what is see otherwise I enjoyed it.

This is an encryption with PyCrypto example tutorial. You will find that PyCrypto is THE go-to source of encryption with python for just about everything. An example of this is the Paramiko SSH module for python, which uses PyCrypto as a dependency to encrypt information. PyCrypto is very simple, yet extremely powerful and useful for encryption within the Python programming language. Knowledge of the basics of encryption is also a very useful skill to have. 

Video Tutorial:

Nothing here 

Cisco Employee

Hi Peter,

  Yep, my bad.  The video link is missing from that page, but I had embedded it in the post above (I should have pointed that out).  Here's the youtube link; Python Encryption Tutorial with PyCrypto - YouTube.

   On the code snippits, interesting.  If I scroll all the way down the page it shows up as two separate sets of text, That being said, I had also combined both the Encode and decode routines in a single .py file called ''  in the CL repository - again my bad, I should have pointed out the specific directory paths in the crypto tab of the  'getting_started_contents.xlsx' spreadsheet

The code is located in:

\Part IV DevNet Sessions\Crypto Background\Video 28 Crypto Part III Lambdas\ 

and also...

\Part IV DevNet Sessions\Crypto Background\Video 32 Crypto Part VI Putting It All Together\

Thanks Peter



thanks for response will have a peek

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here