# What is Cryptography? – Encryption and Decryption

“Cryptography – Study of Secure Communication” Cryptography comes from the Greek words “kryptos” meaning ‘hidden or secret’ and “graphein” meaning ‘writing’ Another related concept is Steganography. Steganography is the combination of two greek words, “steganos” meaning ‘covered concealed or protected’ and “graphein” meaning ‘writing’. Both are the techniques used for secure communication. So, what are the differences between these two? In cryptography it is assumed that the encrypted message is accessible by all, but only the intended recipient should be able to decrypt the message.

On the other hand, steganography focuses on hiding the messages in such a way that only the recipient knows that the message even exists.

These hidden messages can either be encrypted or not depending on the requirement. To sum it up, steganography adds another level of security by hiding the encrypted message. Moving ahead with cryptography, it consists of two processes, encryption or ciphering and decryption or deciphering. Ordinary information called ‘plaintext’ is encrypted into unintelligible information called ‘ciphertext’.

This conversion from ‘plaintext’ to ‘ciphertext’ and back from ‘ciphertext’ to ‘plaintext’ is done using a ‘specific set of information’ called KEY. Just like traditional locks have a physical key which locks and unlocks it. In cryptography, set of information known as key is used to encrypt and decrypt the messages.

Cryptography can be implemented in two ways, depending on the type of key used. Symmetric key or Private key Cryptography and, Asymmetric key or Public key Cryptography Symmetric key or Private key cryptography uses the same key to encrypt and decrypt the messages.

A simple example is the key which shifts the letters three places. When Alice wants to send a message to Bob, she will leftshift the letters three places.

‘E’ will be sent as ‘B’. She will also have to send the key to Bob. On the receiving side, Bob will use the key sent by Alice to recover the message.

Letters will be right shifted three places and he will read, ‘B’ as ‘E’. As the same key is required for encryption and decryption therefore a secure channel is required to transmit the symmetric key. Anyone who gets hold of this key can read all their messages If Alice wants to send a message to Bob using asymmetric public key cryptography then she will have to once use a key generation program to generate a public/private key pair. As the name suggests, public key is meant to be published and transmitted freely over unsecured channel, while private key is kept secret. The strength of public key cryptography lies in the fact that it is not computationally feasible to deduce private key from its corresponding known public key.

Here, Alice will use her private key to encrypt the message and share her public key with the recipient Bob.

And, Bob using Alice’s public key will be able to retrieve the message. There are pros and cons of both symmetric and asymmetric key cryptography. Symmetric key or private key cryptography uses less complex algorithms and are faster. Hence it is better suited for larger volumes of data, while in public key cryptography the private key is never transmitted and hence it does not require a secure channel.

Most practical systems use a combination of both types of cryptography to get the best out from each method. These are called ‘Hybrid Cryptographic Systems’. Before continuing, pause the video here and click on the card or link in the description to watch a short video about ‘Applications of Public Key Cryptography’. This will be useful for better understanding of the next part. Alice and Bob want to have a secure communication on an unsecured channel.

Both, Alice and Bob will generate their private-public key pair. They will exchange their public keys while keeping their private key secret. This exchange of public keys is done only once. To send a message, Alice will use a ‘symmetric key’ to encrypt the message into ‘ciphertext’. In this case, symmetric key is called ‘session key’.

Next, she will use Bob’s public key to encrypt the session key and send it to Bob once at the beginning of every session. At the receiving side, Bob will use his private key to decrypt the session key. Note that, only Bob can decrypt the session key as it was encrypted using his public key. Once he retrieves the session key, Bob can decipher all the messages sent by Alice in that session. This is used in web browsers.

Every time when you log in to a website, a new session is created and the session expires after logout or certain time of inactivity. Cryptography is tricky, watch the video repeatedly to understand it better. Please like and share the video if you find it useful. Thanks for watching. Help us to create more informative content by becoming a patron on patreon.

com. Subscribe to our channel on YouTube for more Biz Sci Tech content..

Read More: What is Blockchain? | CNBC Explains

Seaswami LLC found this on YouTube

``` ```
``` Scroll to Top Go to mobile version /* MonsterInsights Scroll Tracking */ if ( typeof(jQuery) !== 'undefined' ) { jQuery( document ).ready(function(){ function monsterinsights_scroll_tracking_load() { if ( ( typeof(__gaTracker) !== 'undefined' && __gaTracker && __gaTracker.hasOwnProperty( "loaded" ) && __gaTracker.loaded == true ) || ( typeof(__gtagTracker) !== 'undefined' && __gtagTracker ) ) { (function(factory) { factory(jQuery); }(function(\$) { /* Scroll Depth */ "use strict"; var defaults = { percentage: true }; var \$window = \$(window), cache = [], scrollEventBound = false, lastPixelDepth = 0; /* * Plugin */ \$.scrollDepth = function(options) { var startTime = +new Date(); options = \$.extend({}, defaults, options); /* * Functions */ function sendEvent(action, label, scrollDistance, timing) { if ( 'undefined' === typeof MonsterInsightsObject || 'undefined' === typeof MonsterInsightsObject.sendEvent ) { return; } var type = 'event'; var eventName = action; var fieldsArray = { event_category : 'Scroll Depth', event_label : label, value : 1, non_interaction: true, send_to: 'UA-195349017-1' }; MonsterInsightsObject.sendEvent( type, eventName, fieldsArray ); if (arguments.length > 3) { var type = 'event'; var eventName = 'timing_complete'; fieldsArray = { event_category : 'Scroll Depth', name : action, event_label : label, value : timing, non_interaction: 1, send_to: 'UA-195349017-1' }; MonsterInsightsObject.sendEvent( type, eventName, fieldsArray ); } var paramName = action.toLowerCase(); var fieldsArray = { send_to: 'G-WTC2D5D6W2', non_interaction: true }; fieldsArray[paramName] = label; if (arguments.length > 3) { fieldsArray.scroll_timing = timing MonsterInsightsObject.sendEvent('event', 'scroll_depth', fieldsArray); } else { MonsterInsightsObject.sendEvent('event', 'scroll_depth', fieldsArray); } } function calculateMarks(docHeight) { return { '25%' : parseInt(docHeight * 0.25, 10), '50%' : parseInt(docHeight * 0.50, 10), '75%' : parseInt(docHeight * 0.75, 10), /* Cushion to trigger 100% event in iOS */ '100%': docHeight - 5 }; } function checkMarks(marks, scrollDistance, timing) { /* Check each active mark */ \$.each(marks, function(key, val) { if ( \$.inArray(key, cache) === -1 && scrollDistance >= val ) { sendEvent('Percentage', key, scrollDistance, timing); cache.push(key); } }); } function rounded(scrollDistance) { /* Returns String */ return (Math.floor(scrollDistance/250) * 250).toString(); } function init() { bindScrollDepth(); } /* * Public Methods */ /* Reset Scroll Depth with the originally initialized options */ \$.scrollDepth.reset = function() { cache = []; lastPixelDepth = 0; \$window.off('scroll.scrollDepth'); bindScrollDepth(); }; /* Add DOM elements to be tracked */ \$.scrollDepth.addElements = function(elems) { if (typeof elems == "undefined" || !\$.isArray(elems)) { return; } \$.merge(options.elements, elems); /* If scroll event has been unbound from window, rebind */ if (!scrollEventBound) { bindScrollDepth(); } }; /* Remove DOM elements currently tracked */ \$.scrollDepth.removeElements = function(elems) { if (typeof elems == "undefined" || !\$.isArray(elems)) { return; } \$.each(elems, function(index, elem) { var inElementsArray = \$.inArray(elem, options.elements); var inCacheArray = \$.inArray(elem, cache); if (inElementsArray != -1) { options.elements.splice(inElementsArray, 1); } if (inCacheArray != -1) { cache.splice(inCacheArray, 1); } }); }; /* * Throttle function borrowed from: * Underscore.js 1.5.2 * http://underscorejs.org * (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Underscore may be freely distributed under the MIT license. */ function throttle(func, wait) { var context, args, result; var timeout = null; var previous = 0; var later = function() { previous = new Date; timeout = null; result = func.apply(context, args); }; return function() { var now = new Date; if (!previous) previous = now; var remaining = wait - (now - previous); context = this; args = arguments; if (remaining <= 0) { clearTimeout(timeout); timeout = null; previous = now; result = func.apply(context, args); } else if (!timeout) { timeout = setTimeout(later, remaining); } return result; }; } /* * Scroll Event */ function bindScrollDepth() { scrollEventBound = true; \$window.on('scroll.scrollDepth', throttle(function() { /* * We calculate document and window height on each scroll event to * account for dynamic DOM changes. */ var docHeight = \$(document).height(), winHeight = window.innerHeight ? window.innerHeight : \$window.height(), scrollDistance = \$window.scrollTop() + winHeight, /* Recalculate percentage marks */ marks = calculateMarks(docHeight), /* Timing */ timing = +new Date - startTime; checkMarks(marks, scrollDistance, timing); }, 500)); } init(); }; /* UMD export */ return \$.scrollDepth; })); jQuery.scrollDepth(); } else { setTimeout(monsterinsights_scroll_tracking_load, 200); } } monsterinsights_scroll_tracking_load(); }); } /* End MonsterInsights Scroll Tracking */ var astra = {"break_point":"921","isRtl":"","edit_post_url":"https:\/\/cryptoswami.net\/wp-admin\/post.php?post={{id}}&action=edit","ajax_url":"https:\/\/cryptoswami.net\/wp-admin\/admin-ajax.php","infinite_count":"2","infinite_total":"0","pagination":"number","infinite_scroll_event":"scroll","no_more_post_message":"No more posts to show.","grid_layout":"1","site_url":"https:\/\/cryptoswami.net","show_comments":"Show Comments","masonryEnabled":"","blogMasonryBreakPoint":"921"}; var astraAddon = {"sticky_active":"","svgIconClose":"<span class=\"ast-icon icon-close\"><svg viewBox=\"0 0 512 512\" aria-hidden=\"true\" role=\"img\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" width=\"18px\" height=\"18px\">\n <path d=\"M71.029 71.029c9.373-9.372 24.569-9.372 33.942 0L256 222.059l151.029-151.03c9.373-9.372 24.569-9.372 33.942 0 9.372 9.373 9.372 24.569 0 33.942L289.941 256l151.03 151.029c9.372 9.373 9.372 24.569 0 33.942-9.373 9.372-24.569 9.372-33.942 0L256 289.941l-151.029 151.03c-9.373 9.372-24.569 9.372-33.942 0-9.372-9.373-9.372-24.569 0-33.942L222.059 256 71.029 104.971c-9.372-9.373-9.372-24.569 0-33.942z\" \/>\n <\/svg><\/span>","header_main_stick":"0","header_above_stick":"0","header_below_stick":"0","stick_header_meta":"","header_main_stick_meta":"","header_above_stick_meta":"","header_below_stick_meta":"","sticky_header_on_devices":"both","sticky_header_style":"none","sticky_hide_on_scroll":"0","break_point":"921","tablet_break_point":"921","mobile_break_point":"544","header_main_shrink":"","header_logo_width":"","responsive_header_logo_width":{"desktop":198,"tablet":"","mobile":""},"stick_origin_position":"","site_layout":"ast-full-width-layout","site_content_width":"1240","site_layout_padded_width":"1200","site_layout_box_width":"1200","header_builder_active":"1","component_limit":"10","is_header_builder_active":"1"}; /(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+\$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)\$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())},!1); ```