CINXE.COM

DUKPT Explained with examples – Cryptography & Payments

<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="profile" href="https://gmpg.org/xfn/11" /> <title>DUKPT Explained with examples &#8211; Cryptography &amp; Payments</title> <script type="text/javascript"> WebFontConfig = {"google":{"families":["Source+Sans+Pro:r,i,b,bi:latin,latin-ext"]},"api_url":"https:\/\/fonts-api.wp.com\/css"}; (function() { var wf = document.createElement('script'); wf.src = 'https://s0.wp.com/wp-content/plugins/custom-fonts/js/webfont.js'; wf.type = 'text/javascript'; wf.async = 'true'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wf, s); })(); </script><style id="jetpack-custom-fonts-css"></style> <meta name='robots' content='max-image-preview:large, noindex, follow' /> <meta name="google-site-verification" content="Zw5b22p04kGoy8Ch3FcgAxEamB26jLd3FALtlnOF6RA" /> <!-- Async WordPress.com Remote Login --> <script id="wpcom_remote_login_js"> var wpcom_remote_login_extra_auth = ''; function wpcom_remote_login_remove_dom_node_id( element_id ) { var dom_node = document.getElementById( element_id ); if ( dom_node ) { dom_node.parentNode.removeChild( dom_node ); } } function wpcom_remote_login_remove_dom_node_classes( class_name ) { var dom_nodes = document.querySelectorAll( '.' + class_name ); for ( var i = 0; i < dom_nodes.length; i++ ) { dom_nodes[ i ].parentNode.removeChild( dom_nodes[ i ] ); } } function wpcom_remote_login_final_cleanup() { wpcom_remote_login_remove_dom_node_classes( "wpcom_remote_login_msg" ); wpcom_remote_login_remove_dom_node_id( "wpcom_remote_login_key" ); wpcom_remote_login_remove_dom_node_id( "wpcom_remote_login_validate" ); wpcom_remote_login_remove_dom_node_id( "wpcom_remote_login_js" ); wpcom_remote_login_remove_dom_node_id( "wpcom_request_access_iframe" ); wpcom_remote_login_remove_dom_node_id( "wpcom_request_access_styles" ); } // Watch for messages back from the remote login window.addEventListener( "message", function( e ) { if ( e.origin === "https://r-login.wordpress.com" ) { var data = {}; try { data = JSON.parse( e.data ); } catch( e ) { wpcom_remote_login_final_cleanup(); return; } if ( data.msg === 'LOGIN' ) { // Clean up the login check iframe wpcom_remote_login_remove_dom_node_id( "wpcom_remote_login_key" ); var id_regex = new RegExp( /^[0-9]+$/ ); var token_regex = new RegExp( /^.*|.*|.*$/ ); if ( token_regex.test( data.token ) && id_regex.test( data.wpcomid ) ) { // We have everything we need to ask for a login var script = document.createElement( "script" ); script.setAttribute( "id", "wpcom_remote_login_validate" ); script.src = '/remote-login.php?wpcom_remote_login=validate' + '&wpcomid=' + data.wpcomid + '&token=' + encodeURIComponent( data.token ) + '&host=' + window.location.protocol + '//' + window.location.hostname + '&postid=138' + '&is_singular=1'; document.body.appendChild( script ); } return; } // Safari ITP, not logged in, so redirect if ( data.msg === 'LOGIN-REDIRECT' ) { window.location = 'https://wordpress.com/log-in?redirect_to=' + window.location.href; return; } // Safari ITP, storage access failed, remove the request if ( data.msg === 'LOGIN-REMOVE' ) { var css_zap = 'html { -webkit-transition: margin-top 1s; transition: margin-top 1s; } /* 9001 */ html { margin-top: 0 !important; } * html body { margin-top: 0 !important; } @media screen and ( max-width: 782px ) { html { margin-top: 0 !important; } * html body { margin-top: 0 !important; } }'; var style_zap = document.createElement( 'style' ); style_zap.type = 'text/css'; style_zap.appendChild( document.createTextNode( css_zap ) ); document.body.appendChild( style_zap ); var e = document.getElementById( 'wpcom_request_access_iframe' ); e.parentNode.removeChild( e ); document.cookie = 'wordpress_com_login_access=denied; path=/; max-age=31536000'; return; } // Safari ITP if ( data.msg === 'REQUEST_ACCESS' ) { console.log( 'request access: safari' ); // Check ITP iframe enable/disable knob if ( wpcom_remote_login_extra_auth !== 'safari_itp_iframe' ) { return; } // If we are in a "private window" there is no ITP. var private_window = false; try { var opendb = window.openDatabase( null, null, null, null ); } catch( e ) { private_window = true; } if ( private_window ) { console.log( 'private window' ); return; } var iframe = document.createElement( 'iframe' ); iframe.id = 'wpcom_request_access_iframe'; iframe.setAttribute( 'scrolling', 'no' ); iframe.setAttribute( 'sandbox', 'allow-storage-access-by-user-activation allow-scripts allow-same-origin allow-top-navigation-by-user-activation' ); iframe.src = 'https://r-login.wordpress.com/remote-login.php?wpcom_remote_login=request_access&origin=' + encodeURIComponent( data.origin ) + '&wpcomid=' + encodeURIComponent( data.wpcomid ); var css = 'html { -webkit-transition: margin-top 1s; transition: margin-top 1s; } /* 9001 */ html { margin-top: 46px !important; } * html body { margin-top: 46px !important; } @media screen and ( max-width: 660px ) { html { margin-top: 71px !important; } * html body { margin-top: 71px !important; } #wpcom_request_access_iframe { display: block; height: 71px !important; } } #wpcom_request_access_iframe { border: 0px; height: 46px; position: fixed; top: 0; left: 0; width: 100%; min-width: 100%; z-index: 99999; background: #23282d; } '; var style = document.createElement( 'style' ); style.type = 'text/css'; style.id = 'wpcom_request_access_styles'; style.appendChild( document.createTextNode( css ) ); document.body.appendChild( style ); document.body.appendChild( iframe ); } if ( data.msg === 'DONE' ) { wpcom_remote_login_final_cleanup(); } } }, false ); // Inject the remote login iframe after the page has had a chance to load // more critical resources window.addEventListener( "DOMContentLoaded", function( e ) { var iframe = document.createElement( "iframe" ); iframe.style.display = "none"; iframe.setAttribute( "scrolling", "no" ); iframe.setAttribute( "id", "wpcom_remote_login_key" ); iframe.src = "https://r-login.wordpress.com/remote-login.php" + "?wpcom_remote_login=key" + "&origin=aHR0cHM6Ly9hcnRodXJ2YW5kZXJtZXJ3ZS5jb20%3D" + "&wpcomid=70204527" + "&time=1732740283"; document.body.appendChild( iframe ); }, false ); </script> <link rel='dns-prefetch' href='//s1.wp.com' /> <link rel='dns-prefetch' href='//s0.wp.com' /> <link rel='dns-prefetch' href='//s2.wp.com' /> <link rel='dns-prefetch' href='//widgets.wp.com' /> <link rel='dns-prefetch' href='//fonts-api.wp.com' /> <link rel='dns-prefetch' href='//s.pubmine.com' /> <link rel='dns-prefetch' href='//x.bidswitch.net' /> <link rel='dns-prefetch' href='//static.criteo.net' /> <link rel='dns-prefetch' href='//ib.adnxs.com' /> <link rel='dns-prefetch' href='//aax.amazon-adsystem.com' /> <link rel='dns-prefetch' href='//bidder.criteo.com' /> <link rel='dns-prefetch' href='//cas.criteo.com' /> <link rel='dns-prefetch' href='//gum.criteo.com' /> <link rel='dns-prefetch' href='//ads.pubmatic.com' /> <link rel='dns-prefetch' href='//gads.pubmatic.com' /> <link rel='dns-prefetch' href='//tpc.googlesyndication.com' /> <link rel='dns-prefetch' href='//ad.doubleclick.net' /> <link rel='dns-prefetch' href='//googleads.g.doubleclick.net' /> <link rel='dns-prefetch' href='//www.googletagservices.com' /> <link rel='dns-prefetch' href='//cdn.switchadhub.com' /> <link rel='dns-prefetch' href='//delivery.g.switchadhub.com' /> <link rel='dns-prefetch' href='//delivery.swid.switchadhub.com' /> <link rel='dns-prefetch' href='//a.teads.tv' /> <link rel='dns-prefetch' href='//prebid.media.net' /> <link rel='dns-prefetch' href='//adserver-us.adtech.advertising.com' /> <link rel='dns-prefetch' href='//fastlane.rubiconproject.com' /> <link rel='dns-prefetch' href='//prebid-server.rubiconproject.com' /> <link rel='dns-prefetch' href='//hb-api.omnitagjs.com' /> <link rel='dns-prefetch' href='//mtrx.go.sonobi.com' /> <link rel='dns-prefetch' href='//apex.go.sonobi.com' /> <link rel='dns-prefetch' href='//u.openx.net' /> <link rel="alternate" type="application/rss+xml" title="Cryptography &amp; Payments &raquo; Feed" href="https://arthurvandermerwe.com/feed/" /> <link rel="alternate" type="application/rss+xml" title="Cryptography &amp; Payments &raquo; Comments Feed" href="https://arthurvandermerwe.com/comments/feed/" /> <link rel="alternate" type="application/rss+xml" title="Cryptography &amp; Payments &raquo; DUKPT Explained with&nbsp;examples Comments Feed" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/feed/" /> <script type="text/javascript"> /* <![CDATA[ */ function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function () { oldonload(); func(); } } } /* ]]> */ </script> <script> window._wpemojiSettings = {"baseUrl":"https:\/\/s0.wp.com\/wp-content\/mu-plugins\/wpcom-smileys\/twemoji\/2\/72x72\/","ext":".png","svgUrl":"https:\/\/s0.wp.com\/wp-content\/mu-plugins\/wpcom-smileys\/twemoji\/2\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/s2.wp.com\/wp-includes\/js\/wp-emoji-release.min.js?m=1719498190i&ver=6.8-alpha-59438"}}; /*! This file is auto-generated */ !function(i,n){var o,s,e;function c(e){try{var t={supportTests:e,timestamp:(new Date).valueOf()};sessionStorage.setItem(o,JSON.stringify(t))}catch(e){}}function p(e,t,n){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);var t=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data),r=(e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(n,0,0),new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data));return t.every(function(e,t){return e===r[t]})}function u(e,t,n){switch(t){case"flag":return n(e,"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f","\ud83c\udff3\ufe0f\u200b\u26a7\ufe0f")?!1:!n(e,"\ud83c\uddfa\ud83c\uddf3","\ud83c\uddfa\u200b\ud83c\uddf3")&&!n(e,"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f","\ud83c\udff4\u200b\udb40\udc67\u200b\udb40\udc62\u200b\udb40\udc65\u200b\udb40\udc6e\u200b\udb40\udc67\u200b\udb40\udc7f");case"emoji":return!n(e,"\ud83d\udc26\u200d\u2b1b","\ud83d\udc26\u200b\u2b1b")}return!1}function f(e,t,n){var r="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?new OffscreenCanvas(300,150):i.createElement("canvas"),a=r.getContext("2d",{willReadFrequently:!0}),o=(a.textBaseline="top",a.font="600 32px Arial",{});return e.forEach(function(e){o[e]=t(a,e,n)}),o}function t(e){var t=i.createElement("script");t.src=e,t.defer=!0,i.head.appendChild(t)}"undefined"!=typeof Promise&&(o="wpEmojiSettingsSupports",s=["flag","emoji"],n.supports={everything:!0,everythingExceptFlag:!0},e=new Promise(function(e){i.addEventListener("DOMContentLoaded",e,{once:!0})}),new Promise(function(t){var n=function(){try{var e=JSON.parse(sessionStorage.getItem(o));if("object"==typeof e&&"number"==typeof e.timestamp&&(new Date).valueOf()<e.timestamp+604800&&"object"==typeof e.supportTests)return e.supportTests}catch(e){}return null}();if(!n){if("undefined"!=typeof Worker&&"undefined"!=typeof OffscreenCanvas&&"undefined"!=typeof URL&&URL.createObjectURL&&"undefined"!=typeof Blob)try{var e="postMessage("+f.toString()+"("+[JSON.stringify(s),u.toString(),p.toString()].join(",")+"));",r=new Blob([e],{type:"text/javascript"}),a=new Worker(URL.createObjectURL(r),{name:"wpTestEmojiSupports"});return void(a.onmessage=function(e){c(n=e.data),a.terminate(),t(n)})}catch(e){}c(n=f(s,u,p))}t(n)}).then(function(e){for(var t in e)n.supports[t]=e[t],n.supports.everything=n.supports.everything&&n.supports[t],"flag"!==t&&(n.supports.everythingExceptFlag=n.supports.everythingExceptFlag&&n.supports[t]);n.supports.everythingExceptFlag=n.supports.everythingExceptFlag&&!n.supports.flag,n.DOMReady=!1,n.readyCallback=function(){n.DOMReady=!0}}).then(function(){return e}).then(function(){var e;n.supports.everything||(n.readyCallback(),(e=n.source||{}).concatemoji?t(e.concatemoji):e.wpemoji&&e.twemoji&&(t(e.twemoji),t(e.wpemoji)))}))}((window,document),window._wpemojiSettings); </script> <link crossorigin='anonymous' rel='stylesheet' id='all-css-0-1' href='https://s1.wp.com/_static/??-eJx9zEEKhDAMQNELTScKha7Es9Q2FDVtiknx+sOIOIMLlx8eH/ZqAhfFojARJ1OppbkI7LxFHwUS8eTpHURe8Gdzu+SCWn1YzwZpBTLHRiiwIXnFaCqL3urpSPOKv+9RXz7moXe9s53tnF0+3f9FFg==&cssminify=yes' type='text/css' media='all' /> <style id='wp-emoji-styles-inline-css'> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 0.07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link crossorigin='anonymous' rel='stylesheet' id='all-css-2-1' href='https://s2.wp.com/_static/??-eJydzEEOwiAQheELCWNrFV0YzwKUkKkIZGbQcPtWN+5cuHx5+X54VeVLlpAFamoRM0Ns23SB4vZQgOdw0UbvwTVMM7hU/F0ldGSpA0tPQXvmHfwMfRTDEqTaN7e9NFGRcP43QVYwR/7y2+M6mMN4NNP5NC4rOVVP3w==&cssminify=yes' type='text/css' media='all' /> <style id='wp-block-library-inline-css'> .has-text-align-justify { text-align:justify; } .has-text-align-justify{text-align:justify;} </style> <link crossorigin='anonymous' rel='stylesheet' id='all-css-4-1' href='https://s2.wp.com/_static/??-eJzTLy/QzcxLzilNSS3WzyrWz01NyUxMzUnNTc0rQeEU5CRWphbp5qSmJyZX6uVm5uklFxfr6OPTDpRD5sM02efaGpoZmFkYGRuZGmQBAHPvL0Y=&cssminify=yes' type='text/css' media='all' /> <style id='jetpack-sharing-buttons-style-inline-css'> .jetpack-sharing-buttons__services-list{display:flex;flex-direction:row;flex-wrap:wrap;gap:0;list-style-type:none;margin:5px;padding:0}.jetpack-sharing-buttons__services-list.has-small-icon-size{font-size:12px}.jetpack-sharing-buttons__services-list.has-normal-icon-size{font-size:16px}.jetpack-sharing-buttons__services-list.has-large-icon-size{font-size:24px}.jetpack-sharing-buttons__services-list.has-huge-icon-size{font-size:36px}@media print{.jetpack-sharing-buttons__services-list{display:none!important}}.editor-styles-wrapper .wp-block-jetpack-sharing-buttons{gap:0;padding-inline-start:0}ul.jetpack-sharing-buttons__services-list.has-background{padding:1.25em 2.375em} </style> <style id='classic-theme-styles-inline-css'> /*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} </style> <link crossorigin='anonymous' rel='stylesheet' id='all-css-8-1' href='https://s1.wp.com/_static/??/wp-content/mu-plugins/core-compat/wp-mediaelement.css,/wp-content/mu-plugins/wpcom-bbpress-premium-themes.css?m=1432920480j&cssminify=yes' type='text/css' media='all' /> <style id='global-styles-inline-css'> :root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--color--primary: #000000;--wp--preset--color--secondary: #3C8067;--wp--preset--color--foreground: #333333;--wp--preset--color--tertiary: #FAFBF6;--wp--preset--color--background: #FFFFFF;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--gradient--hard-diagonal: linear-gradient(to bottom right, #3C8067 49.9%, #FAFBF6 50%);--wp--preset--gradient--hard-diagonal-inverted: linear-gradient(to top left, #3C8067 49.9%, #FAFBF6 50%);--wp--preset--gradient--hard-horizontal: linear-gradient(to bottom, #3C8067 50%, #FAFBF6 50%);--wp--preset--gradient--hard-horizontal-inverted: linear-gradient(to top, #3C8067 50%, #FAFBF6 50%);--wp--preset--gradient--diagonal: linear-gradient(to bottom right, #3C8067, #FAFBF6);--wp--preset--gradient--diagonal-inverted: linear-gradient(to top left, #3C8067, #FAFBF6);--wp--preset--gradient--horizontal: linear-gradient(to bottom, #3C8067, #FAFBF6);--wp--preset--gradient--horizontal-inverted: linear-gradient(to top, #3C8067, #FAFBF6);--wp--preset--gradient--stripe: linear-gradient(to bottom, transparent 20%, #3C8067 20%, #3C8067 80%, transparent 80%);--wp--preset--font-size--small: 16px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 24px;--wp--preset--font-size--x-large: 42px;--wp--preset--font-size--tiny: 14px;--wp--preset--font-size--normal: 18px;--wp--preset--font-size--huge: 28px;--wp--preset--font-family--albert-sans: 'Albert Sans', sans-serif;--wp--preset--font-family--alegreya: Alegreya, serif;--wp--preset--font-family--arvo: Arvo, serif;--wp--preset--font-family--bodoni-moda: 'Bodoni Moda', serif;--wp--preset--font-family--bricolage-grotesque: 'Bricolage Grotesque', sans-serif;--wp--preset--font-family--cabin: Cabin, sans-serif;--wp--preset--font-family--chivo: Chivo, sans-serif;--wp--preset--font-family--commissioner: Commissioner, sans-serif;--wp--preset--font-family--cormorant: Cormorant, serif;--wp--preset--font-family--courier-prime: 'Courier Prime', monospace;--wp--preset--font-family--crimson-pro: 'Crimson Pro', serif;--wp--preset--font-family--dm-mono: 'DM Mono', monospace;--wp--preset--font-family--dm-sans: 'DM Sans', sans-serif;--wp--preset--font-family--dm-serif-display: 'DM Serif Display', serif;--wp--preset--font-family--domine: Domine, serif;--wp--preset--font-family--eb-garamond: 'EB Garamond', serif;--wp--preset--font-family--epilogue: Epilogue, sans-serif;--wp--preset--font-family--fahkwang: Fahkwang, sans-serif;--wp--preset--font-family--figtree: Figtree, sans-serif;--wp--preset--font-family--fira-sans: 'Fira Sans', sans-serif;--wp--preset--font-family--fjalla-one: 'Fjalla One', sans-serif;--wp--preset--font-family--fraunces: Fraunces, serif;--wp--preset--font-family--gabarito: Gabarito, system-ui;--wp--preset--font-family--ibm-plex-mono: 'IBM Plex Mono', monospace;--wp--preset--font-family--ibm-plex-sans: 'IBM Plex Sans', sans-serif;--wp--preset--font-family--ibarra-real-nova: 'Ibarra Real Nova', serif;--wp--preset--font-family--instrument-serif: 'Instrument Serif', serif;--wp--preset--font-family--inter: Inter, sans-serif;--wp--preset--font-family--josefin-sans: 'Josefin Sans', sans-serif;--wp--preset--font-family--jost: Jost, sans-serif;--wp--preset--font-family--libre-baskerville: 'Libre Baskerville', serif;--wp--preset--font-family--libre-franklin: 'Libre Franklin', sans-serif;--wp--preset--font-family--literata: Literata, serif;--wp--preset--font-family--lora: Lora, serif;--wp--preset--font-family--merriweather: Merriweather, serif;--wp--preset--font-family--montserrat: Montserrat, sans-serif;--wp--preset--font-family--newsreader: Newsreader, serif;--wp--preset--font-family--noto-sans-mono: 'Noto Sans Mono', sans-serif;--wp--preset--font-family--nunito: Nunito, sans-serif;--wp--preset--font-family--open-sans: 'Open Sans', sans-serif;--wp--preset--font-family--overpass: Overpass, sans-serif;--wp--preset--font-family--pt-serif: 'PT Serif', serif;--wp--preset--font-family--petrona: Petrona, serif;--wp--preset--font-family--piazzolla: Piazzolla, serif;--wp--preset--font-family--playfair-display: 'Playfair Display', serif;--wp--preset--font-family--plus-jakarta-sans: 'Plus Jakarta Sans', sans-serif;--wp--preset--font-family--poppins: Poppins, sans-serif;--wp--preset--font-family--raleway: Raleway, sans-serif;--wp--preset--font-family--roboto: Roboto, sans-serif;--wp--preset--font-family--roboto-slab: 'Roboto Slab', serif;--wp--preset--font-family--rubik: Rubik, sans-serif;--wp--preset--font-family--rufina: Rufina, serif;--wp--preset--font-family--sora: Sora, sans-serif;--wp--preset--font-family--source-sans-3: 'Source Sans 3', sans-serif;--wp--preset--font-family--source-serif-4: 'Source Serif 4', serif;--wp--preset--font-family--space-mono: 'Space Mono', monospace;--wp--preset--font-family--syne: Syne, sans-serif;--wp--preset--font-family--texturina: Texturina, serif;--wp--preset--font-family--urbanist: Urbanist, sans-serif;--wp--preset--font-family--work-sans: 'Work Sans', sans-serif;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;}.has-albert-sans-font-family{font-family: var(--wp--preset--font-family--albert-sans) !important;}.has-alegreya-font-family{font-family: var(--wp--preset--font-family--alegreya) !important;}.has-arvo-font-family{font-family: var(--wp--preset--font-family--arvo) !important;}.has-bodoni-moda-font-family{font-family: var(--wp--preset--font-family--bodoni-moda) !important;}.has-bricolage-grotesque-font-family{font-family: var(--wp--preset--font-family--bricolage-grotesque) !important;}.has-cabin-font-family{font-family: var(--wp--preset--font-family--cabin) !important;}.has-chivo-font-family{font-family: var(--wp--preset--font-family--chivo) !important;}.has-commissioner-font-family{font-family: var(--wp--preset--font-family--commissioner) !important;}.has-cormorant-font-family{font-family: var(--wp--preset--font-family--cormorant) !important;}.has-courier-prime-font-family{font-family: var(--wp--preset--font-family--courier-prime) !important;}.has-crimson-pro-font-family{font-family: var(--wp--preset--font-family--crimson-pro) !important;}.has-dm-mono-font-family{font-family: var(--wp--preset--font-family--dm-mono) !important;}.has-dm-sans-font-family{font-family: var(--wp--preset--font-family--dm-sans) !important;}.has-dm-serif-display-font-family{font-family: var(--wp--preset--font-family--dm-serif-display) !important;}.has-domine-font-family{font-family: var(--wp--preset--font-family--domine) !important;}.has-eb-garamond-font-family{font-family: var(--wp--preset--font-family--eb-garamond) !important;}.has-epilogue-font-family{font-family: var(--wp--preset--font-family--epilogue) !important;}.has-fahkwang-font-family{font-family: var(--wp--preset--font-family--fahkwang) !important;}.has-figtree-font-family{font-family: var(--wp--preset--font-family--figtree) !important;}.has-fira-sans-font-family{font-family: var(--wp--preset--font-family--fira-sans) !important;}.has-fjalla-one-font-family{font-family: var(--wp--preset--font-family--fjalla-one) !important;}.has-fraunces-font-family{font-family: var(--wp--preset--font-family--fraunces) !important;}.has-gabarito-font-family{font-family: var(--wp--preset--font-family--gabarito) !important;}.has-ibm-plex-mono-font-family{font-family: var(--wp--preset--font-family--ibm-plex-mono) !important;}.has-ibm-plex-sans-font-family{font-family: var(--wp--preset--font-family--ibm-plex-sans) !important;}.has-ibarra-real-nova-font-family{font-family: var(--wp--preset--font-family--ibarra-real-nova) !important;}.has-instrument-serif-font-family{font-family: var(--wp--preset--font-family--instrument-serif) !important;}.has-inter-font-family{font-family: var(--wp--preset--font-family--inter) !important;}.has-josefin-sans-font-family{font-family: var(--wp--preset--font-family--josefin-sans) !important;}.has-jost-font-family{font-family: var(--wp--preset--font-family--jost) !important;}.has-libre-baskerville-font-family{font-family: var(--wp--preset--font-family--libre-baskerville) !important;}.has-libre-franklin-font-family{font-family: var(--wp--preset--font-family--libre-franklin) !important;}.has-literata-font-family{font-family: var(--wp--preset--font-family--literata) !important;}.has-lora-font-family{font-family: var(--wp--preset--font-family--lora) !important;}.has-merriweather-font-family{font-family: var(--wp--preset--font-family--merriweather) !important;}.has-montserrat-font-family{font-family: var(--wp--preset--font-family--montserrat) !important;}.has-newsreader-font-family{font-family: var(--wp--preset--font-family--newsreader) !important;}.has-noto-sans-mono-font-family{font-family: var(--wp--preset--font-family--noto-sans-mono) !important;}.has-nunito-font-family{font-family: var(--wp--preset--font-family--nunito) !important;}.has-open-sans-font-family{font-family: var(--wp--preset--font-family--open-sans) !important;}.has-overpass-font-family{font-family: var(--wp--preset--font-family--overpass) !important;}.has-pt-serif-font-family{font-family: var(--wp--preset--font-family--pt-serif) !important;}.has-petrona-font-family{font-family: var(--wp--preset--font-family--petrona) !important;}.has-piazzolla-font-family{font-family: var(--wp--preset--font-family--piazzolla) !important;}.has-playfair-display-font-family{font-family: var(--wp--preset--font-family--playfair-display) !important;}.has-plus-jakarta-sans-font-family{font-family: var(--wp--preset--font-family--plus-jakarta-sans) !important;}.has-poppins-font-family{font-family: var(--wp--preset--font-family--poppins) !important;}.has-raleway-font-family{font-family: var(--wp--preset--font-family--raleway) !important;}.has-roboto-font-family{font-family: var(--wp--preset--font-family--roboto) !important;}.has-roboto-slab-font-family{font-family: var(--wp--preset--font-family--roboto-slab) !important;}.has-rubik-font-family{font-family: var(--wp--preset--font-family--rubik) !important;}.has-rufina-font-family{font-family: var(--wp--preset--font-family--rufina) !important;}.has-sora-font-family{font-family: var(--wp--preset--font-family--sora) !important;}.has-source-sans-3-font-family{font-family: var(--wp--preset--font-family--source-sans-3) !important;}.has-source-serif-4-font-family{font-family: var(--wp--preset--font-family--source-serif-4) !important;}.has-space-mono-font-family{font-family: var(--wp--preset--font-family--space-mono) !important;}.has-syne-font-family{font-family: var(--wp--preset--font-family--syne) !important;}.has-texturina-font-family{font-family: var(--wp--preset--font-family--texturina) !important;}.has-urbanist-font-family{font-family: var(--wp--preset--font-family--urbanist) !important;}.has-work-sans-font-family{font-family: var(--wp--preset--font-family--work-sans) !important;} :where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;} :root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;} :where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;} </style> <link crossorigin='anonymous' rel='stylesheet' id='all-css-10-1' href='https://s0.wp.com/wp-content/mu-plugins/jetpack-mu-wpcom-plugin/sun/vendor/automattic/jetpack-mu-wpcom/src/build/verbum-comments/verbum-comments.css?m=1729061509i&cssminify=yes' type='text/css' media='all' /> <link rel='stylesheet' id='verbum-gutenberg-css-css' href='https://widgets.wp.com/verbum-block-editor/block-editor.css?ver=1721244820' media='all' /> <link rel='stylesheet' id='seedlet-fonts-css' href='https://fonts-api.wp.com/css?family=Fira+Sans%3Aital%2Cwght%400%2C400%3B0%2C500%3B1%2C400%7CPlayfair+Display%3Aital%2Cwght%400%2C400%3B0%2C700%3B1%2C400&#038;subset=latin%2Clatin-ext' media='all' /> <link crossorigin='anonymous' rel='stylesheet' id='all-css-14-1' href='https://s0.wp.com/_static/??/wp-content/themes/pub/seedlet/style.css,/wp-content/themes/pub/seedlet/assets/css/style-navigation.css?m=1720456615j&cssminify=yes' type='text/css' media='all' /> <link crossorigin='anonymous' rel='stylesheet' id='print-css-15-1' href='https://s2.wp.com/wp-content/themes/pub/seedlet/assets/css/print.css?m=1603804565i&cssminify=yes' type='text/css' media='print' /> <link crossorigin='anonymous' rel='stylesheet' id='all-css-16-1' href='https://s0.wp.com/_static/??-eJx9y0EOwjAMRNELYQyiBbFAnKU1JgQ5dlQ7qnp7yq5s2M2X5uFcgUyDNTBeXNixthGd+SEcmJVwrmQFPBbhPbnvcENKgyotZXWceBRL60y4vjb5DyU2EKMhsulPwFOGPH3pvdyO/bU7dOdLf3p/AANwQOQ=&cssminify=yes' type='text/css' media='all' /> <style id='jetpack-global-styles-frontend-style-inline-css'> :root { --font-headings: unset; --font-base: unset; --font-headings-default: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; --font-base-default: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;} </style> <link crossorigin='anonymous' rel='stylesheet' id='all-css-18-1' href='https://s0.wp.com/_static/??-eJyNjcsKQjEMBX/ImlsQry7ET5GahrbXNCmmRfx7H7gRN+7OwGEGbs2hSifpUIdrPFIRg4V6C3j5MNgQqBoHk4HlcKUYYry/Z5G0RrMV/C06FUEwxRLYsSa1L/iR9Uz1mc0bSKznwK/DsR787Kd5P/ntbnkAuNBIYA==&cssminify=yes' type='text/css' media='all' /> <script id="jetpack_related-posts-js-extra"> var related_posts_js_options = {"post_heading":"h4"}; </script> <script id="wpcom-actionbar-placeholder-js-extra"> var actionbardata = {"siteID":"70204527","postID":"138","siteURL":"https:\/\/arthurvandermerwe.com","xhrURL":"https:\/\/arthurvandermerwe.com\/wp-admin\/admin-ajax.php","nonce":"fe839908c7","isLoggedIn":"","statusMessage":"","subsEmailDefault":"instantly","proxyScriptUrl":"https:\/\/s0.wp.com\/wp-content\/js\/wpcom-proxy-request.js?ver=20211021","shortlink":"https:\/\/wp.me\/p4Kzp5-2e","i18n":{"followedText":"New posts from this site will now appear in your <a href=\"https:\/\/wordpress.com\/read\">Reader<\/a>","foldBar":"Collapse this bar","unfoldBar":"Expand this bar"}}; </script> <script id="jetpack-mu-wpcom-settings-js-before"> var JETPACK_MU_WPCOM_SETTINGS = {"assetsUrl":"https:\/\/s1.wp.com\/wp-content\/mu-plugins\/jetpack-mu-wpcom-plugin\/sun\/vendor\/automattic\/jetpack-mu-wpcom\/src\/build\/"}; </script> <script crossorigin='anonymous' type='text/javascript' src='https://s0.wp.com/_static/??-eJyVj9FuwjAMRX8IY9ppbHuY+BSUJqakc5woTqD9e4JAiPHGk3Vln2NdPCewUQpJwVAhcR29KE5UkrF/94xaBfdeLA7Vs8NMbAo5SFGL/k/r4GU96QqfvFO74QIpx3l53ZUjBVJMdUAlckwFjSo1baOsKpxM1qaW5eCZ+7dwT10HBz+/QgPH8dH0HLMzTsHyFby9DQlP/XWARIHRpdwUu/DbffWbz4/N9vtnugDPQXLc'></script> <script id="rlt-proxy-js-after"> rltInitialize( {"token":null,"iframeOrigins":["https:\/\/widgets.wp.com"]} ); </script> <link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://arthurvandermerwe.wordpress.com/xmlrpc.php?rsd" /> <meta name="generator" content="WordPress.com" /> <link rel="canonical" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/" /> <link rel='shortlink' href='https://wp.me/p4Kzp5-2e' /> <link rel="alternate" type="application/json+oembed" href="https://public-api.wordpress.com/oembed/?format=json&amp;url=https%3A%2F%2Farthurvandermerwe.com%2F2015%2F05%2F30%2Fdukpt-explained-with-examples%2F&amp;for=wpcom-auto-discovery" /><link rel="alternate" type="application/xml+oembed" href="https://public-api.wordpress.com/oembed/?format=xml&amp;url=https%3A%2F%2Farthurvandermerwe.com%2F2015%2F05%2F30%2Fdukpt-explained-with-examples%2F&amp;for=wpcom-auto-discovery" /> <!-- Jetpack Open Graph Tags --> <meta property="og:type" content="article" /> <meta property="og:title" content="DUKPT Explained with examples" /> <meta property="og:url" content="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/" /> <meta property="og:description" content="Derived Unique Key Per Transaction (DUKPT) process that&#8217;s described in Annex A of ANS X9.24-2004. It&#8217;s generally considered to be complex, but I&#8217;ve simplified it slightly with the…" /> <meta property="article:published_time" content="2015-05-30T05:30:52+00:00" /> <meta property="article:modified_time" content="2015-05-30T05:37:00+00:00" /> <meta property="og:site_name" content="Cryptography &amp; Payments" /> <meta property="og:image" content="https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=200" /> <meta property="og:image:width" content="200" /> <meta property="og:image:height" content="200" /> <meta property="og:image:alt" content="" /> <meta property="og:locale" content="en_US" /> <meta property="article:publisher" content="https://www.facebook.com/WordPresscom" /> <meta name="twitter:text:title" content="DUKPT Explained with&nbsp;examples" /> <meta name="twitter:image" content="https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=240" /> <meta name="twitter:card" content="summary" /> <!-- End Jetpack Open Graph Tags --> <link rel='openid.server' href='https://arthurvandermerwe.com/?openidserver=1' /> <link rel='openid.delegate' href='https://arthurvandermerwe.com/' /> <link rel="search" type="application/opensearchdescription+xml" href="https://arthurvandermerwe.com/osd.xml" title="Cryptography &#38; Payments" /> <link rel="search" type="application/opensearchdescription+xml" href="https://s1.wp.com/opensearch.xml" title="WordPress.com" /> <link rel="pingback" href="https://arthurvandermerwe.com/xmlrpc.php"> <style type="text/css"> .recentcomments a { display: inline !important; padding: 0 !important; margin: 0 !important; } table.recentcommentsavatartop img.avatar, table.recentcommentsavatarend img.avatar { border: 0px; margin: 0; } table.recentcommentsavatartop a, table.recentcommentsavatarend a { border: 0px !important; background-color: transparent !important; } td.recentcommentsavatarend, td.recentcommentsavatartop { padding: 0px 0px 1px 0px; margin: 0px; } td.recentcommentstextend { border: none !important; padding: 0px 0px 2px 10px; } .rtl td.recentcommentstextend { padding: 0px 10px 2px 0px; } td.recentcommentstexttop { border: none; padding: 0px 0px 0px 10px; } .rtl td.recentcommentstexttop { padding: 0px 10px 0px 0px; } </style> <meta name="application-name" content="Cryptography &amp; Payments" /><meta name="msapplication-window" content="width=device-width;height=device-height" /><meta name="msapplication-tooltip" content="Arthur Van Der Merwe" /><meta name="description" content="Derived Unique Key Per Transaction (DUKPT) process that&#039;s described in Annex A of ANS X9.24-2004. It&#039;s generally considered to be complex, but I&#039;ve simplified it slightly with the help of online resources. Key Management Here&#039;s a basic outline of the technique: You&#039;re given a Base Derivation Key (BDK), which you assign to a swiper (note&hellip;" /> <script> var wa_smart = { 'network_id': 3905, 'site_id': 560111, 'page_id': 1700829, 'blog_id': 70204527, 'post_id': 138, 'theme': 'pub/seedlet', 'target': 'wp_blog_id=70204527;language=en', '_': { 'title': 'Advertisement', 'privacy_settings': 'Privacy Settings' }, 'top': { 'enabled': false, 'adflow_enabled': true, 'format_id': 135099 }, 'inline': { 'enabled': true, 'adflow_enabled': true, 'format_id': 110354, 'max_slots': 20, 'max_blaze_slots': 20 }, 'belowpost': { 'enabled': false, 'adflow_enabled': true, 'format_id': 134071 }, 'bottom_sticky': { 'enabled': false, 'adflow_enabled': true, 'format_id': 117571 }, 'sidebar': { 'enabled': false, 'adflow_enabled': true, 'format_id': 134686 }, 'sidebar_sticky_right': { 'enabled': false, 'adflow_enabled': true, 'format_id': 135281 }, 'gutenberg_rectangle': { 'enabled': false, 'adflow_enabled': true, 'format_id': 134788 }, 'gutenberg_leaderboard': { 'enabled': false, 'adflow_enabled': true, 'format_id': 135073 }, 'gutenberg_mobile_leaderboard': { 'enabled': false, 'adflow_enabled': true, 'format_id': 135098 }, 'gutenberg_skyscraper': { 'enabled': false, 'adflow_enabled': true, 'format_id': 135088 } }; wa_smart.cmd = []; </script> <script type="text/javascript"> function __ATA_CC() {var v = document.cookie.match('(^|;) ?personalized-ads-consent=([^;]*)(;|$)');return v ? 1 : 0;} var __ATA_PP = { 'pt': 1, 'ht': 1, 'tn': 'seedlet', 'uloggedin': 0, 'amp': false, 'consent': __ATA_CC(), 'gdpr_applies': false, 'ad': { 'label': { 'text': 'Advertisements' }, 'reportAd': { 'text': 'Report this ad' } }, 'disabled_slot_formats': [ 'IAD' ], 'siteid': 70204527, 'afp_ad_client': 'pub-6694573643007653' }; var __ATA = __ATA || {}; __ATA.cmd = __ATA.cmd || []; __ATA.criteo = __ATA.criteo || {}; __ATA.criteo.cmd = __ATA.criteo.cmd || []; </script> <script type="text/javascript"> (function(){var g=Date.now||function(){return+new Date};function h(a,b){a:{for(var c=a.length,d="string"==typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:"string"==typeof a?a.charAt(b):a[b]};function k(a,b,c){c=null!=c?"="+encodeURIComponent(String(c)):"";if(b+=c){c=a.indexOf("#");0>c&&(c=a.length);var d=a.indexOf("?");if(0>d||d>c){d=c;var e=""}else e=a.substring(d+1,c);a=[a.substr(0,d),e,a.substr(c)];c=a[1];a[1]=b?c?c+"&"+b:b:c;a=a[0]+(a[1]?"?"+a[1]:"")+a[2]}return a};var l=0;function m(a,b){var c=document.createElement("script");c.src=a;c.onload=function(){b&&b(void 0)};c.onerror=function(){b&&b("error")};a=document.getElementsByTagName("head");var d;a&&0!==a.length?d=a[0]:d=document.documentElement;d.appendChild(c)}function n(a){var b=void 0===b?document.cookie:b;return(b=h(b.split("; "),function(c){return-1!=c.indexOf(a+"=")}))?b.split("=")[1]:""}function p(a){return"string"==typeof a&&0<a.length} function r(a,b,c){b=void 0===b?"":b;c=void 0===c?".":c;var d=[];Object.keys(a).forEach(function(e){var f=a[e],q=typeof f;"object"==q&&null!=f||"function"==q?d.push(r(f,b+e+c)):null!==f&&void 0!==f&&(e=encodeURIComponent(b+e),d.push(e+"="+encodeURIComponent(f)))});return d.filter(p).join("&")}function t(a,b){a||((window.__ATA||{}).config=b.c,m(b.url))}var u=Math.floor(1E13*Math.random()),v=window.__ATA||{};window.__ATA=v;window.__ATA.cmd=v.cmd||[];v.rid=u;v.createdAt=g();var w=window.__ATA||{},x="s.pubmine.com"; w&&w.serverDomain&&(x=w.serverDomain);var y="//"+x+"/conf",z=window.top===window,A=window.__ATA_PP&&window.__ATA_PP.gdpr_applies,B="boolean"===typeof A?Number(A):null,C=window.__ATA_PP||null,D=z?document.referrer?document.referrer:null:null,E=z?window.location.href:document.referrer?document.referrer:null,F,G=n("__ATA_tuuid");F=G?G:null;var H=window.innerWidth+"x"+window.innerHeight,I=n("usprivacy"),J=r({gdpr:B,pp:C,rid:u,src:D,ref:E,tuuid:F,vp:H,us_privacy:I?I:null},"","."); (function(a){var b=void 0===b?"cb":b;l++;var c="callback__"+g().toString(36)+"_"+l.toString(36);a=k(a,b,c);window[c]=function(d){t(void 0,d)};m(a,function(d){d&&t(d)})})(y+"?"+J);}).call(this); </script> <script> var sas_fallback = sas_fallback || []; sas_fallback.push( { tag: "&lt;div id=&quot;atatags-702045271-{{unique_id}}&quot;&gt;&lt;/div&gt;&lt;script&gt;__ATA.cmd.push(function() {__ATA.initDynamicSlot({id: \'atatags-702045271-{{unique_id}}\',location: 120,formFactor: \'001\',label: {text: \'Advertisements\',},creative: {reportAd: {text: \'Report this ad\',},privacySettings: {text: \'Privacy\',}}});});&lt;/script&gt;", type: 'belowpost' }, { tag: "&lt;div id=&quot;atatags-702045271-{{unique_id}}&quot;&gt;&lt;/div&gt;&lt;script&gt;__ATA.cmd.push(function() {__ATA.initDynamicSlot({id: \'atatags-702045271-{{unique_id}}\',location: 310,formFactor: \'001\',label: {text: \'Advertisements\',},creative: {reportAd: {text: \'Report this ad\',},privacySettings: {text: \'Privacy\',}}});});&lt;/script&gt;", type: 'inline' }, { tag: "&lt;div id=&quot;atatags-702045271-{{unique_id}}&quot;&gt;&lt;/div&gt;&lt;script&gt;__ATA.cmd.push(function() {__ATA.initDynamicSlot({id: \'atatags-702045271-{{unique_id}}\',location: 140,formFactor: \'003\',label: {text: \'Advertisements\',},creative: {reportAd: {text: \'Report this ad\',},privacySettings: {text: \'Privacy\',}}});});&lt;/script&gt;", type: 'sidebar' }, { tag: "&lt;div id=&quot;atatags-702045271-{{unique_id}}&quot;&gt;&lt;/div&gt;&lt;script&gt;__ATA.cmd.push(function() {__ATA.initDynamicSlot({id: \'atatags-702045271-{{unique_id}}\',location: 110,formFactor: \'002\',label: {text: \'Advertisements\',},creative: {reportAd: {text: \'Report this ad\',},privacySettings: {text: \'Privacy\',}}});});&lt;/script&gt;", type: 'top' } ); </script><link rel="icon" href="https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=32" sizes="32x32" /> <link rel="icon" href="https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=192" sizes="192x192" /> <link rel="apple-touch-icon" href="https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=180" /> <meta name="msapplication-TileImage" content="https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=270" /> </head> <body class="post-template-default single single-post postid-138 single-format-standard wp-embed-responsive customizer-styles-applied singular has-main-navigation jetpack-reblog-enabled"> <div id="page" class="site"> <a class="skip-link screen-reader-text" href="#content">Skip to content</a> <header id="masthead" class="site-header header_classes has-title-and-tagline has-menu" role="banner"> <div class="site-branding"> <p class="site-title"><a href="https://arthurvandermerwe.com/" rel="home">Cryptography &amp; Payments</a></p> <p class="site-description"> Arthur Van Der Merwe </p> </div><!-- .site-branding --> <nav id="site-navigation" class="primary-navigation" role="navigation" aria-label="Main"> <button id="primary-close-menu" class="button close"> <span class="dropdown-icon close">Close <svg class="svg-icon" width="24" height="24" aria-hidden="true" role="img" focusable="false" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 10.9394L5.53033 4.46973L4.46967 5.53039L10.9393 12.0001L4.46967 18.4697L5.53033 19.5304L12 13.0607L18.4697 19.5304L19.5303 18.4697L13.0607 12.0001L19.5303 5.53039L18.4697 4.46973L12 10.9394Z" fill="currentColor"/></svg></span> <span class="hide-visually collapsed-text">collapsed</span> </button> <div class="primary-menu-container"><ul id="menu-financial-switching-1" class="menu-wrapper"><li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-239"><a href="https://arthurvandermerwe.com/category/hsm/">HSM</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-240"><a href="https://arthurvandermerwe.com/category/cryptography-2/">Cryptography</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-241"><a href="https://arthurvandermerwe.com/category/financial-switching/">Financial Switching</a></li> <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-242"><a href="https://arthurvandermerwe.com/category/atm-tracing/">ATM Tracing</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-27"><a href="https://arthurvandermerwe.com/downloads/">Downloads</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-5"><a href="https://arthurvandermerwe.com/about/">About</a></li> </ul></div> </nav><!-- #site-navigation --> <div class="menu-button-container"> <button id="primary-open-menu" class="button open"> <span class="dropdown-icon open">Menu <svg class="svg-icon" width="24" height="24" aria-hidden="true" role="img" focusable="false" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 6H19.5V7.5H4.5V6ZM4.5 12H19.5V13.5H4.5V12ZM19.5 18H4.5V19.5H19.5V18Z" fill="currentColor"/></svg></span> <span class="hide-visually expanded-text">expanded</span> </button> </div> <div class="menu-button-container"> </div> </header><!-- #masthead --> <div id="content" class="site-content"> <section id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <article id="post-138" class="post-138 post type-post status-publish format-standard hentry category-financial-switching category-uncategorized tag-ans-x9-24 tag-bdk tag-desdecrypt tag-desencrypt tag-iksns tag-ipek tag-ksn tag-tripledesdecrypt tag-tripledesencrypt entry"> <header class="entry-header default-max-width"> <h1 class="entry-title">DUKPT Explained with&nbsp;examples</h1> <div class="entry-meta"> </div><!-- .meta-info --> </header> <div class="entry-content"> <div class="cs-rating pd-rating" id="pd_rating_holder_7692610_post_138"></div><br/><p>Derived Unique Key Per Transaction (DUKPT) process that&#8217;s described in Annex A of ANS X9.24-2004.</p> <p>It&#8217;s generally considered to be complex, but I&#8217;ve simplified it slightly with the help of online resources.</p> <h2>Key Management<br /> <a id="user-content-usage" class="anchor" href="#usage"></a></h2> <p>Here&#8217;s a basic outline of the technique:</p> <ol> <li>You&#8217;re given a Base Derivation Key (BDK), which you assign to a swiper (note that the same BDK <em>can</em> be assigned to multiple swipers).</li> <li>You&#8217;ll use the BDK along with the device&#8217;s own unique Key Serial Number (KSN) to generate an Initial PIN Encryption Key (IPEK) for the device.</li> <li>You&#8217;ll assign this IPEK to a swiper, which uses it to irreversibly generate a list of future keys, which it&#8217;ll use to encrypt its messages.</li> <li>The swiper&#8217;s KSN is used along with one of its future keys to encrypt a message, and after each swipe it&#8217;ll increment the value of its KSN.</li> <li>Whenever a swiper takes a card it formats the card&#8217;s information into a series of tracks, each track having a particular set of information (e.g. card number, holder&#8217;s name, expiration date).</li> <li>The swiper usually encrypts these tracks using one of its generated future keys (called the &#8220;Session Key&#8221;) along with its current KSN. It&#8217;ll then increment the value of its KSN and discard the future key it used.</li> <li>At this point you&#8217;ll probably have an encrypted track along with the KSN the swiper used to encrypt it.</li> <li>It&#8217;s your responsibility to determine what BDK was used to initialize this device, and from there you&#8217;ll use the BDK and KSN to rederive the IPEK, which is used to rederive the Session Key, which is finally used to decrypt the message.</li> </ol> <p>There&#8217;s a lot of technical information to be said about key management, but this isn&#8217;t the place for that. In some cases your provider/manufacturer (e.g. MagTek) will supply you with swipers that need to be initialized with an IPEK, and your supplier will usually have a manual that walks you through that process. If you&#8217;re doing encryption/decryption through a third party who also supplies swipers, they may have already loaded the devices with that information; what&#8217;s more is they may not even given you the BDK that belongs to your device in order to reduce the risk of security threats.</p> <hr /> <p><strong>Note:</strong> Key management is beyond the scope of this explanation. Whatever you do with your keys, just make sure it&#8217;s secure.</p> <hr /> <p>One methodology I&#8217;ve seen that&#8217;ll allow you to associate a particular KSN to a BDK is to take the current KSN you&#8217;ve been given, mask it to retrieve the Initial Key Serial Number (IKSN), and look up the BDK in a table that maps IKSNs to BDKs:</p> <p>Example:</p> <pre><code>ksn = FFFF9876543210E00008 iksn = ksn &amp; FFFFFFFFFFFFFFE00000 // FFFF9876543210E00000 </code></pre> <p>You&#8217;d then have a table that looks like:</p> <table> <thead> <tr> <th align="center">IKSN</th> <th align="center">BDK</th> </tr> </thead> <tbody> <tr> <td align="center">0xFFFF9876543210E00000</td> <td align="center">0123456789ABCDEFFEDCBA9876543210</td> </tr> <tr> <td align="center">&#8230;</td> <td align="center">&#8230;</td> </tr> </tbody> </table> <p>From which you could easily grab the BDK <code>0123456789ABCDEFFEDCBA9876543210</code>.</p> <h2><a id="user-content-algorithm" class="anchor" href="#algorithm"></a>Algorithm</h2> <hr /> <p><strong>Note:</strong> Assume that all numeric values are hexadecimal numbers, or the representation of a sequence of bytes as a hexadecimal number.</p> <hr /> <p>The following are the BDK, KSN, and encrypted track message (cryptogram) we&#8217;ve been given:</p> <pre><code>bdk = 0123456789ABCDEFFEDCBA9876543210 ksn = FFFF9876543210E00008 cryptogram = C25C1D1197D31CAA87285D59A892047426D9182EC11353C051ADD6D0F072A6CB3436560B3071FC1FD11D9F7E74886742D9BEE0CFD1EA1064C213BB55278B2F12 </code></pre> <p>Here&#8217;s an example of the unencrypted track 1 data (cryptogram above), and below that is its value in hex; this is what we&#8217;ll get after successfully decrypting the cryptogram:</p> <pre><code>%B5452300551227189^HOGAN/PAUL ^08043210000000725000000? 2542353435323330303535313232373138395E484F47414E2F5041554C2020202020205E30383034333231303030303030303732353030303030303F00000000 </code></pre> <hr /> <p><strong>Note:</strong> As you&#8217;re probably already aware, this algorithm is best described using big numbers, which can&#8217;t be represented as literals in some programming languages (like Java or C#). However, many languages have classes that allow you to represent big numbers in other ways (e.g., java.math.BigInteger, System.Numerics.BigInteger). It&#8217;s your job to adapt this algorithm so that it can be represented in your language of choice. Two small problems I encountered were ensuring the correct endianness and signedness were being used (this algorithm requires the byte order to be big endian and that unsigned integers are used). I made a utility class called BigInt to do this for me.</p> <hr /> <p>First, let&#8217;s define a few standard functions:</p> <ul> <li><a href="http://en.wikipedia.org/wiki/Data_Encryption_Standard">DES</a> and <a href="http://en.wikipedia.org/wiki/Triple_DES">Triple DES</a> refer to their respective cryptographic algorithms. Most programming languages have access to some implementation of these ciphers either through OpenSSL or Bouncy Castle. These ciphers are initialized with a zeroed out IV of 8 bytes, they&#8217;re zero-padded, and use Cipher-Block Chaining (CBC). Let&#8217;s define the signatures for these standard functions that&#8217;ll be used throughout this algorithm: <ul> <li><code>DesEncrypt(key, message) -&gt; returns cryptogram</code></li> <li><code>DesDecrypt(key, cryptogram) -&gt; returns message</code></li> <li><code>TripleDesEncrypt(key, message) -&gt; returns cryptogram</code></li> <li><code>TripleDesDecrypt(key, cryptogram) -&gt; returns message</code></li> </ul> </li> </ul> <p>First we must create the IPEK given then KSN and BDK:</p> <pre><code>CreateIpek(ksn, bdk) { return TripleDesEncrypt(bdk, (ksn &amp; KsnMask) &gt;&gt; 16) &lt;&lt; 64 | TripleDesEncrypt(bdk ^ KeyMask, (ksn &amp; KsnMask) &gt;&gt; 16) } </code></pre> <p>Now we can get the IPEK:</p> <pre><code>ipek = CreateIpek(ksn, bdk) = CreateIpek(FFFF9876543210E00008, 0123456789ABCDEFFEDCBA9876543210) = 6AC292FAA1315B4D858AB3A3D7D5933A </code></pre> <p>After that we need a way to get the Session Key (this one is more complicated):</p> <pre><code>CreateSessionKey(ipek, ksn) { return DeriveKey(ipek, ksn) ^ FF00000000000000FF } </code></pre> <p>The DeriveKey method finds the IKSN and generates session keys until it gets to the one that corresponds to the current KSN. We define this method as:</p> <pre><code>DeriveKey(ipek, ksn) { ksnReg = ksn &amp; FFFFFFFFFFE00000 curKey = ipek for (shiftReg = 0x100000; shiftReg &gt; 0; shiftReg &gt;&gt;= 1) if ((shiftReg &amp; ksn &amp; 1FFFFF) &gt; 0) curKey = GenerateKey(curKey, ksnReg |= shiftReg) return curKey } </code></pre> <p>Where the GenerateKey method looks like:</p> <pre><code>GenerateKey(key, ksn) { return EncryptRegister(key ^ KeyMask, ksn) &lt;&lt; 64 | EncryptRegister(key, ksn) } </code></pre> <p>And EncryptRegister looks like:</p> <pre><code>EncryptRegister(key, reg) { return (key &amp; FFFFFFFFFFFFFFFF) ^ DesEncrypt((key &amp; FFFFFFFFFFFFFFFF0000000000000000) &gt;&gt; 64, key &amp; FFFFFFFFFFFFFFFF ^ reg) } </code></pre> <p>Then you can generate the Session Key given the IPEK and KSN:</p> <pre><code>key = CreateSessionKey(ipek, ksn) = CreateSessionKey(6AC292FAA1315B4D858AB3A3D7D5933A, FFFF9876543210E00008) = 27F66D5244FF621EAA6F6120EDEB427F </code></pre> <p>Which can be used to decrypt the cryptogram:</p> <pre><code>message = TripleDesDecrypt(key, cryptogram) = TripleDesDecrypt(27F66D5244FF621EAA6F6120EDEB427F, C25C1D1197D31CAA87285D59A892047426D9182EC11353C051ADD6D0F072A6CB3436560B3071FC1FD11D9F7E74886742D9BEE0CFD1EA1064C213BB55278B2F12) = 2542353435323330303535313232373138395E484F47414E2F5041554C2020202020205E30383034333231303030303030303732353030303030303F00000000 = %B5452300551227189^HOGAN/PAUL ^08043210000000725000000? </code></pre> <p>That&#8217;s it, you&#8217;re done!</p> <span id="wordads-inline-marker" style="display: none;"></span><div id="atatags-702045275-674784bc046d6"> <script type="text/javascript"> __ATA.cmd.push(function() { __ATA.initVideoSlot('atatags-702045275-674784bc046d6', { sectionId: '702045275', format: 'inread' }); }); </script> </div> <div id="atatags-702045271-674784bc0472c"></div> <script> __ATA.cmd.push(function() { __ATA.initDynamicSlot({ id: 'atatags-702045271-674784bc0472c', location: 120, formFactor: '001', label: { text: 'Advertisements', }, creative: { reportAd: { text: 'Report this ad', }, privacySettings: { text: 'Privacy', } } }); }); </script><div id="jp-post-flair" class="sharedaddy sd-rating-enabled sd-like-enabled sd-sharing-enabled"><div class="sharedaddy sd-sharing-enabled"><div class="robots-nocontent sd-block sd-social sd-social-icon sd-sharing"><h3 class="sd-title">Share this:</h3><div class="sd-content"><ul><li class="share-twitter"><a rel="nofollow noopener noreferrer" data-shared="sharing-twitter-138" class="share-twitter sd-button share-icon no-text" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?share=twitter" target="_blank" title="Click to share on Twitter" ><span></span><span class="sharing-screen-reader-text">Click to share on Twitter (Opens in new window)</span></a></li><li class="share-facebook"><a rel="nofollow noopener noreferrer" data-shared="sharing-facebook-138" class="share-facebook sd-button share-icon no-text" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?share=facebook" target="_blank" title="Click to share on Facebook" ><span></span><span class="sharing-screen-reader-text">Click to share on Facebook (Opens in new window)</span></a></li><li class="share-end"></li></ul></div></div></div><div class='sharedaddy sd-block sd-like jetpack-likes-widget-wrapper jetpack-likes-widget-unloaded' id='like-post-wrapper-70204527-138-674784bc04e90' data-src='//widgets.wp.com/likes/index.html?ver=20241127#blog_id=70204527&amp;post_id=138&amp;origin=arthurvandermerwe.wordpress.com&amp;obj_id=70204527-138-674784bc04e90&amp;domain=arthurvandermerwe.com' data-name='like-post-frame-70204527-138-674784bc04e90' data-title='Like or Reblog'><div class='likes-widget-placeholder post-likes-widget-placeholder' style='height: 55px;'><span class='button'><span>Like</span></span> <span class='loading'>Loading...</span></div><span class='sd-text-color'></span><a class='sd-link-color'></a></div> <div id='jp-relatedposts' class='jp-relatedposts' > <h3 class="jp-relatedposts-headline"><em>Related</em></h3> </div></div> </div><!-- .entry-content --> <footer class="entry-footer default-max-width"> <span class="byline"><svg class="svg-icon" width="16" height="16" aria-hidden="true" role="img" focusable="false" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 7.5C15 9.15685 13.6569 10.5 12 10.5C10.3431 10.5 9 9.15685 9 7.5C9 5.84315 10.3431 4.5 12 4.5C13.6569 4.5 15 5.84315 15 7.5ZM16.5 7.5C16.5 9.98528 14.4853 12 12 12C9.51472 12 7.5 9.98528 7.5 7.5C7.5 5.01472 9.51472 3 12 3C14.4853 3 16.5 5.01472 16.5 7.5ZM19.5 19.5V16.245C19.5 14.729 18.271 13.5 16.755 13.5L7.245 13.5C5.72898 13.5 4.5 14.729 4.5 16.245L4.5 19.5H6L6 16.245C6 15.5574 6.5574 15 7.245 15L16.755 15C17.4426 15 18 15.5574 18 16.245V19.5H19.5Z" fill="currentColor"/></svg><span class="screen-reader-text">Posted by</span><span class="author vcard"><a class="url fn n" href="https://arthurvandermerwe.com/author/arthurvdmerwe/">arthurvdmerwe</a></span></span><span class="posted-on"><svg class="svg-icon" width="16" height="16" aria-hidden="true" role="img" focusable="false" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 7.5H4.5V19.0005C4.5 19.2764 4.72363 19.5 4.9995 19.5H19.0005C19.2764 19.5 19.5 19.2764 19.5 19.0005V7.5ZM3 7.5V4.9995V4.995C3 3.89319 3.89319 3 4.995 3H4.9995H19.0005H19.005C20.1068 3 21 3.89319 21 4.995V4.9995V7.5V19.0005C21 20.1048 20.1048 21 19.0005 21H4.9995C3.89521 21 3 20.1048 3 19.0005V7.5ZM7.5 10.5H9V12H7.5V10.5ZM9 15H7.5V16.5H9V15ZM11.25 10.5H12.75V12H11.25V10.5ZM12.75 15H11.25V16.5H12.75V15ZM15 10.5H16.5V12H15V10.5ZM16.5 15H15V16.5H16.5V15Z" fill="currentColor"/></svg><a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/" rel="bookmark"><time class="entry-date published" datetime="2015-05-30T15:30:52+10:00">May 30, 2015</time><time class="updated" datetime="2015-05-30T15:37:00+10:00">May 30, 2015</time></a></span><span class="cat-links"><svg class="svg-icon" width="16" height="16" aria-hidden="true" role="img" focusable="false" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.1979 8.25L11.2098 6.27363C11.1259 6.10593 10.9545 6 10.767 6H4.995C4.72162 6 4.5 6.22162 4.5 6.495V17.505C4.5 17.7784 4.72162 18 4.995 18H19.0005C19.2764 18 19.5 17.7764 19.5 17.5005V8.7495C19.5 8.47363 19.2764 8.25 19.0005 8.25H12.1979ZM13.125 6.75H19.0005C20.1048 6.75 21 7.64521 21 8.7495V17.5005C21 18.6048 20.1048 19.5 19.0005 19.5H4.995C3.89319 19.5 3 18.6068 3 17.505V6.495C3 5.39319 3.89319 4.5 4.995 4.5H10.767C11.5227 4.5 12.2135 4.92693 12.5514 5.60281L13.125 6.75Z" fill="currentColor"/></svg><span class="screen-reader-text">Posted in</span><a href="https://arthurvandermerwe.com/category/financial-switching/" rel="category tag">Financial Switching</a>, <a href="https://arthurvandermerwe.com/category/uncategorized/" rel="category tag">Uncategorized</a></span><span class="tags-links"><svg class="svg-icon" width="16" height="16" aria-hidden="true" role="img" focusable="false" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 12.2045C3 12.5941 3.15158 12.9684 3.42267 13.2482L9.71878 19.747C11.0769 21.1489 13.3201 21.1667 14.7003 19.7865L19.7873 14.6995C21.1677 13.319 21.1497 11.0753 19.7471 9.71731L13.2459 3.42238C12.9661 3.15147 12.5919 3 12.2025 3H4.5C3.67157 3 3 3.67157 3 4.5V12.2045ZM12.2025 4.5H4.5V12.2045L10.7961 18.7033C11.5714 19.5035 12.8518 19.5137 13.6396 18.7258L18.7266 13.6388C19.5146 12.8509 19.5043 11.5701 18.7037 10.7949L12.2025 4.5ZM8.4975 9.495C9.0484 9.495 9.495 9.0484 9.495 8.4975C9.495 7.9466 9.0484 7.5 8.4975 7.5C7.9466 7.5 7.5 7.9466 7.5 8.4975C7.5 9.0484 7.9466 9.495 8.4975 9.495Z" fill="currentColor"/></svg><span class="screen-reader-text">Tags:</span><a href="https://arthurvandermerwe.com/tag/ans-x9-24/" rel="tag">ANS X9.24</a>, <a href="https://arthurvandermerwe.com/tag/bdk/" rel="tag">BDK</a>, <a href="https://arthurvandermerwe.com/tag/desdecrypt/" rel="tag">DesDecrypt</a>, <a href="https://arthurvandermerwe.com/tag/desencrypt/" rel="tag">DesEncrypt</a>, <a href="https://arthurvandermerwe.com/tag/iksns/" rel="tag">IKSNs</a>, <a href="https://arthurvandermerwe.com/tag/ipek/" rel="tag">IPEK</a>, <a href="https://arthurvandermerwe.com/tag/ksn/" rel="tag">KSN</a>, <a href="https://arthurvandermerwe.com/tag/tripledesdecrypt/" rel="tag">TripleDesDecrypt</a>, <a href="https://arthurvandermerwe.com/tag/tripledesencrypt/" rel="tag">TripleDesEncrypt</a></span> </footer><!-- .entry-footer --> <div class="entry-author author-avatar-show"> <div class="author-avatar"> <img alt='' src='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=48&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&#038;r=G' srcset='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=48&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&#038;r=G 1x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=72&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D72&#038;r=G 1.5x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=96&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#038;r=G 2x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=144&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D144&#038;r=G 3x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=192&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D192&#038;r=G 4x' class='avatar avatar-48' height='48' width='48' loading='lazy' decoding='async' /> </div><!-- .author-avatar --> <div class="author-heading"> <h2 class="author-title"> Published by <span class="author-name">arthurvdmerwe</span> </h2> </div><!-- .author-heading --> <p class="author-bio"> <a class="author-link" href="https://arthurvandermerwe.com/author/arthurvdmerwe/" rel="author"> View all posts by arthurvdmerwe </a> </p><!-- .author-bio --> </div><!-- .entry-auhtor --> </article><!-- #post-${ID} --> <nav class="navigation post-navigation" aria-label="Posts"> <h2 class="screen-reader-text">Post navigation</h2> <div class="nav-links"><div class="nav-previous"><a href="https://arthurvandermerwe.com/2015/05/28/eftpos-initialisation-using-rsa-cryptography/" rel="prev"><span class="meta-nav" aria-hidden="true">Previous Post</span> <span class="screen-reader-text">Previous post:</span> <br/><span class="post-title">EFTPOS Initialisation using RSA&nbsp;Cryptography</span></a></div><div class="nav-next"><a href="https://arthurvandermerwe.com/2015/07/31/the-refund-vulnerability-of-as2805-and-eftpos/" rel="next"><span class="meta-nav" aria-hidden="true">Next Post</span> <span class="screen-reader-text">Next post:</span> <br/><span class="post-title">The Refund vulnerability of AS2805 and&nbsp;EFTPOS</span></a></div></div> </nav> <div id="comments" class="comments-area default-max-width"> <h2 class="comments-title"> 18 Comments </h2><!-- .comments-title --> <ol class="comment-list commentlist"> <li class="comment even thread-even depth-1 parent" id="comment-321"> <div id="div-comment-321" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=63&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=84&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=126&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=168&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://n/a" class="url" rel="ugc external nofollow">Niall</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-321">December 5, 2016 at 10:08 am</a> </div> <p>Arthur, first off: incredible article, thank you.</p> <p>Two questions:<br /> 1. You supply a single key to the TripleDesEncrypt &#8211; can you provide any insight into how the 3 (or 2?) keys for the three-part DES encryption are generated? do i need to care?<br /> 2. What&#8217;s the value of the KeyMask you use to xor against the BDK during one of the TripleDesEncrypt steps?</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=321#respond" data-commentid="321" data-postid="138" data-belowelement="div-comment-321" data-respondelement="respond" data-replyto="Reply to Niall" aria-label="Reply to Niall">Reply</a></div> </div> <ol class="children"> <li class="comment byuser comment-author-arthurvdmerwe bypostauthor odd alt depth-2" id="comment-322"> <div id="div-comment-322" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=63&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=84&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=126&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=168&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://arthurvandermerwe.com" class="url" rel="ugc">arthurvdmerwe</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-322">December 5, 2016 at 10:29 am</a> </div> <p>Hi Niall, here is the C# example for the article. Mask is hardcoded and TDES function is used from the Microsoft crypto library.<br /> <code><br /> using System;<br /> using System.Linq;<br /> using System.Numerics;<br /> using System.Security.Cryptography;</p> <p> public static class Dukpt<br /> {<br /> private static readonly BigInteger Reg3Mask = BigInt.FromHex("1FFFFF");<br /> private static readonly BigInteger ShiftRegMask = BigInt.FromHex("100000");<br /> private static readonly BigInteger Reg8Mask = BigInt.FromHex("FFFFFFFFFFE00000");<br /> private static readonly BigInteger Ls16Mask = BigInt.FromHex("FFFFFFFFFFFFFFFF");<br /> private static readonly BigInteger Ms16Mask = BigInt.FromHex("FFFFFFFFFFFFFFFF0000000000000000");<br /> private static readonly BigInteger KeyMask = BigInt.FromHex("C0C0C0C000000000C0C0C0C000000000");<br /> private static readonly BigInteger PekMask = BigInt.FromHex("FF00000000000000FF");<br /> private static readonly BigInteger KsnMask = BigInt.FromHex("FFFFFFFFFFFFFFE00000");<br /> private static readonly BigInteger DekMask = BigInt.FromHex("0000000000FF00000000000000FF0000"); </p> <p> public static BigInteger CreateBdk(BigInteger key1, BigInteger key2)<br /> {<br /> return key1 ^ key2;<br /> }</p> <p> public static BigInteger CreateIpek(BigInteger ksn, BigInteger bdk)<br /> {<br /> return Transform("TripleDES", true, bdk, (ksn &amp; KsnMask) &gt;&gt; 16) &lt;&gt; 16);<br /> }</p> <p> public static BigInteger CreateSessionKey(BigInteger ipek, BigInteger ksn)<br /> {<br /> return DeriveKey(ipek, ksn) ^ PekMask;<br /> }</p> <p> // Added in the handling for decrypting IDTech tracks<br /> public static BigInteger CreateSessionKeyIdTech(BigInteger ipek, BigInteger ksn) {<br /> var key = DeriveKey(ipek, ksn) ^ DekMask;<br /> return Transform("TripleDES", true, key, (key &amp; Ms16Mask) &gt;&gt; 64) &lt; 0; shiftReg &gt;&gt;= 1)<br /> if ((shiftReg &amp; ksn &amp; Reg3Mask) &gt; 0)<br /> curKey = GenerateKey(curKey, ksnReg |= shiftReg);<br /> return curKey;<br /> }</p> <p> public static BigInteger GenerateKey(BigInteger key, BigInteger ksn)<br /> {<br /> return EncryptRegister(key ^ KeyMask, ksn) &lt;&gt; 64, (curKey &amp; Ls16Mask ^ reg8));<br /> }</p> <p> public static BigInteger Transform(string name, bool encrypt, BigInteger key, BigInteger message)<br /> {<br /> using (var cipher = SymmetricAlgorithm.Create(name))<br /> {<br /> var k = key.GetBytes();</p> <p> // gets the next multiple of 8<br /> cipher.Key = new byte[Math.Max(0, GetNearestWholeMultiple(k.Length, 8) - k.Length)].Concat(key.GetBytes()).ToArray();<br /> cipher.IV = new byte[8];<br /> cipher.Mode = CipherMode.CBC;<br /> cipher.Padding = PaddingMode.Zeros;<br /> using (var crypto = encrypt ? cipher.CreateEncryptor() : cipher.CreateDecryptor())<br /> {<br /> var data = message.GetBytes();<br /> // Added the GetNearestWholeMultiple here.<br /> data = new byte[Math.Max(0, GetNearestWholeMultiple(data.Length, 8) - data.Length)].Concat(message.GetBytes()).ToArray();<br /> return BigInt.FromBytes(crypto.TransformFinalBlock(data, 0, data.Length));<br /> }<br /> }<br /> }</p> <p> // Gets the next multiple of 8<br /> // Works with both scenarios, getting 7 bytes instead of 8 and works when expecting 16 bytes and getting 15.<br /> private static int GetNearestWholeMultiple(decimal input, int multiple)<br /> {<br /> var output = Math.Round(input / multiple);<br /> if (output == 0 &amp;&amp; input &gt; 0) output += 1;<br /> output *= multiple;<br /> return (int)output;<br /> }</p> <p> public static byte[] Encrypt(string bdk, string ksn, byte[] track)<br /> {<br /> return Transform("TripleDES", true, CreateSessionKey(CreateIpek(<br /> BigInt.FromHex(ksn), BigInt.FromHex(bdk)), BigInt.FromHex(ksn)), BigInt.FromBytes(track)).GetBytes();<br /> }</p> <p> public static byte[] Decrypt(string bdk, string ksn, byte[] track)<br /> {<br /> return Transform("TripleDES", false, CreateSessionKey(CreateIpek(<br /> BigInt.FromHex(ksn), BigInt.FromHex(bdk)), BigInt.FromHex(ksn)), BigInt.FromBytes(track)).GetBytes();<br /> }</p> <p> public static byte[] DecryptIdTech(string bdk, string ksn, byte[] track)<br /> {<br /> return Transform("TripleDES", false, CreateSessionKeyIdTech(CreateIpek(<br /> BigInt.FromHex(ksn), BigInt.FromHex(bdk)), BigInt.FromHex(ksn)), BigInt.FromBytes(track)).GetBytes();<br /> }<br /> }<br /> public static class BigInt<br /> {</p> <p> public static BigInteger FromHex(string hex)<br /> {<br /> return BigInteger.Parse("00" + hex, System.Globalization.NumberStyles.HexNumber);<br /> }</p> <p> public static BigInteger FromBytes(byte[] bytes)<br /> {<br /> return new BigInteger(bytes.Reverse().Concat(new byte[] { 0 }).ToArray());<br /> }</p> <p> public static byte[] GetBytes(this BigInteger number)<br /> {<br /> return number.ToByteArray().Reverse().SkipWhile(b =&gt; b == 0).ToArray();<br /> }<br /> }<br /> }</code></p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=322#respond" data-commentid="322" data-postid="138" data-belowelement="div-comment-322" data-respondelement="respond" data-replyto="Reply to arthurvdmerwe" aria-label="Reply to arthurvdmerwe">Reply</a></div> </div> </li><!-- #comment-## --> </ol><!-- .children --> </li><!-- #comment-## --> <li class="comment byuser comment-author-arthurvdmerwe bypostauthor even thread-odd thread-alt depth-1 parent" id="comment-323"> <div id="div-comment-323" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=63&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=84&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=126&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=168&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://arthurvandermerwe.com" class="url" rel="ugc">arthurvdmerwe</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-323">December 5, 2016 at 10:33 am</a> </div> <p>example of the usage of the code:<br /> var test = &#8220;%B5452300551227189^HOGAN/PAUL ^08043210000000725000000?\0\0\0\0&#8221;;</p> <p>// Decrypting<br /> var bdk = &#8220;0123456789ABCDEFFEDCBA9876543210&#8221;;<br /> var ksn = &#8220;FFFF9876543210E00008&#8221;;<br /> var track = &#8220;C25C1D1197D31CAA87285D59A892047426D9182EC11353C051ADD6D0F072A6CB3436560B3071FC1FD11D9F7E74886742D9BEE0CFD1EA1064C213BB55278B2F12&#8221;;<br /> var decBytes = Dukpt.Decrypt(bdk, ksn, BigInt.FromHex(track).GetBytes());<br /> var decrypted = Encoding.UTF8.GetString(decBytes);<br /> Console.WriteLine(decrypted == test); // True</p> <p>// Encrypting<br /> var encBytes = Dukpt.Encrypt(bdk, ksn, decBytes);<br /> var encrypted = BitConverter.ToString(encBytes).Replace(&#8220;-&#8220;, &#8220;&#8221;);<br /> Console.WriteLine(encrypted == track); // True</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=323#respond" data-commentid="323" data-postid="138" data-belowelement="div-comment-323" data-respondelement="respond" data-replyto="Reply to arthurvdmerwe" aria-label="Reply to arthurvdmerwe">Reply</a></div> </div> <ol class="children"> <li class="comment odd alt depth-2" id="comment-324"> <div id="div-comment-324" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=63&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=84&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=126&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://0.gravatar.com/avatar/920c40cd110715d8777307c88f5652f1a26743e392a6961629dcc7937926321b?s=168&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://n/a" class="url" rel="ugc external nofollow">Niall</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-324">December 5, 2016 at 12:09 pm</a> </div> <p>You complete legend, thank you very much indeed!<br /> epic kupos to you &#8211; this gear is a total head melt but you&#8217;ve explained it incredibly well.</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=324#respond" data-commentid="324" data-postid="138" data-belowelement="div-comment-324" data-respondelement="respond" data-replyto="Reply to Niall" aria-label="Reply to Niall">Reply</a></div> </div> </li><!-- #comment-## --> </ol><!-- .children --> </li><!-- #comment-## --> <li class="comment byuser comment-author-pankajpatil96 even thread-even depth-1 parent" id="comment-325"> <div id="div-comment-325" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://1.gravatar.com/avatar/dae2f9de57a7c28eab803aab9ac4b1865c46cd1eafe116fb5b9a10e57301ef17?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://1.gravatar.com/avatar/dae2f9de57a7c28eab803aab9ac4b1865c46cd1eafe116fb5b9a10e57301ef17?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://1.gravatar.com/avatar/dae2f9de57a7c28eab803aab9ac4b1865c46cd1eafe116fb5b9a10e57301ef17?s=63&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://1.gravatar.com/avatar/dae2f9de57a7c28eab803aab9ac4b1865c46cd1eafe116fb5b9a10e57301ef17?s=84&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://1.gravatar.com/avatar/dae2f9de57a7c28eab803aab9ac4b1865c46cd1eafe116fb5b9a10e57301ef17?s=126&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://1.gravatar.com/avatar/dae2f9de57a7c28eab803aab9ac4b1865c46cd1eafe116fb5b9a10e57301ef17?s=168&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn">Pankaj Patil's Blog</cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-325">December 9, 2016 at 11:26 pm</a> </div> <p>Can you please provide the Java Implementation of the Same.</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=325#respond" data-commentid="325" data-postid="138" data-belowelement="div-comment-325" data-respondelement="respond" data-replyto="Reply to Pankaj Patil&#039;s Blog" aria-label="Reply to Pankaj Patil&#039;s Blog">Reply</a></div> </div> <ol class="children"> <li class="comment odd alt depth-2" id="comment-327"> <div id="div-comment-327" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=63&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=84&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=126&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=168&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://gravatar.com/yashcomplex" class="url" rel="ugc external nofollow">Yash Jain</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-327">December 12, 2016 at 12:32 am</a> </div> <p>Did you get the Java implementation of the same then please share the same.</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=327#respond" data-commentid="327" data-postid="138" data-belowelement="div-comment-327" data-respondelement="respond" data-replyto="Reply to Yash Jain" aria-label="Reply to Yash Jain">Reply</a></div> </div> </li><!-- #comment-## --> <li class="comment byuser comment-author-yashcomplex even depth-2 parent" id="comment-328"> <div id="div-comment-328" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=63&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=84&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=126&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://1.gravatar.com/avatar/14f0fce6e24ec0917a2b8a67f95d3b0e5b34df0bf0c6e04a6410e8003930dc88?s=168&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://yashcomplex.wordpress.com" class="url" rel="ugc external nofollow">yashcomplex</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-328">December 12, 2016 at 12:33 am</a> </div> <p>In case if you have got the java implementation of the same then please share with me @email <a href="mailto:yashcomplex@gmail.com">yashcomplex@gmail.com</a></p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=328#respond" data-commentid="328" data-postid="138" data-belowelement="div-comment-328" data-respondelement="respond" data-replyto="Reply to yashcomplex" aria-label="Reply to yashcomplex">Reply</a></div> </div> <ol class="children"> <li class="comment byuser comment-author-arthurvdmerwe bypostauthor odd alt depth-3" id="comment-330"> <div id="div-comment-330" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=63&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=84&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=126&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=168&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://arthurvandermerwe.com" class="url" rel="ugc">arthurvdmerwe</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-330">December 12, 2016 at 10:35 am</a> </div> <p>Sorry, You would need to make your own Java implementation.</p> </div> </li><!-- #comment-## --> </ol><!-- .children --> </li><!-- #comment-## --> <li class="comment even depth-2" id="comment-555"> <div id="div-comment-555" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://1.gravatar.com/avatar/d546f77cb2ee03acd96302994fef65eea1cc00241470b6df8fde88d558c86d1c?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://1.gravatar.com/avatar/d546f77cb2ee03acd96302994fef65eea1cc00241470b6df8fde88d558c86d1c?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://1.gravatar.com/avatar/d546f77cb2ee03acd96302994fef65eea1cc00241470b6df8fde88d558c86d1c?s=63&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://1.gravatar.com/avatar/d546f77cb2ee03acd96302994fef65eea1cc00241470b6df8fde88d558c86d1c?s=84&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://1.gravatar.com/avatar/d546f77cb2ee03acd96302994fef65eea1cc00241470b6df8fde88d558c86d1c?s=126&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://1.gravatar.com/avatar/d546f77cb2ee03acd96302994fef65eea1cc00241470b6df8fde88d558c86d1c?s=168&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn">Ashish Kumar</cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-555">March 29, 2018 at 4:20 am</a> </div> <p>brother if u got the implementation of java code of the same .then plz share me.<br /> Thanks in advance.</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=555#respond" data-commentid="555" data-postid="138" data-belowelement="div-comment-555" data-respondelement="respond" data-replyto="Reply to Ashish Kumar" aria-label="Reply to Ashish Kumar">Reply</a></div> </div> </li><!-- #comment-## --> </ol><!-- .children --> </li><!-- #comment-## --> <li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-364"> <div id="div-comment-364" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=63&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=84&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=126&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=168&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://no%20website" class="url" rel="ugc external nofollow">Krishna Telgave</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-364">March 20, 2017 at 1:56 am</a> </div> <p>Great Article.<br /> Can you please help regarding DUKPT PINBLOCK Decryption.</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=364#respond" data-commentid="364" data-postid="138" data-belowelement="div-comment-364" data-respondelement="respond" data-replyto="Reply to Krishna Telgave" aria-label="Reply to Krishna Telgave">Reply</a></div> </div> <ol class="children"> <li class="comment byuser comment-author-arthurvdmerwe bypostauthor even depth-2 parent" id="comment-365"> <div id="div-comment-365" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=63&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=84&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=126&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=168&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://arthurvandermerwe.com" class="url" rel="ugc">arthurvdmerwe</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-365">March 21, 2017 at 5:40 pm</a> </div> <p>Hi Krishna, cannot at the moment unfortunately have to much work.</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=365#respond" data-commentid="365" data-postid="138" data-belowelement="div-comment-365" data-respondelement="respond" data-replyto="Reply to arthurvdmerwe" aria-label="Reply to arthurvdmerwe">Reply</a></div> </div> <ol class="children"> <li class="comment odd alt depth-3" id="comment-366"> <div id="div-comment-366" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=42' srcset='https://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=42 1x, https://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=63 1.5x, https://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=84 2x, https://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=126 3x, https://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=168 4x' class='avatar avatar-42 avatar-default' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn">Anonymous</cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-366">March 22, 2017 at 1:17 am</a> </div> <p>Thanks anyway. I have successfully decrypted DUKPT PIN.</p> </div> </li><!-- #comment-## --> <li class="comment even depth-3" id="comment-367"> <div id="div-comment-367" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=42&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=63&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=84&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=126&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://1.gravatar.com/avatar/a71d24f62efb65bd71029f161b37e82af7e7a62cf387bc23913fcdd050955d4c?s=168&#038;d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn">Krishna Telgave</cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-367">March 22, 2017 at 1:18 am</a> </div> <p>Thanks anyway. i have successfully decrypted DUKPT Pinblock.</p> </div> </li><!-- #comment-## --> </ol><!-- .children --> </li><!-- #comment-## --> </ol><!-- .children --> </li><!-- #comment-## --> <li class="comment odd alt thread-even depth-1" id="comment-814"> <div id="div-comment-814" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://i0.wp.com/pbs.twimg.com/profile_images/378800000414742385/e11e6436c9b51b27e41a0f139d5a2010_normal.jpeg?resize=42%2C42&#038;ssl=1' srcset='https://i0.wp.com/pbs.twimg.com/profile_images/378800000414742385/e11e6436c9b51b27e41a0f139d5a2010_normal.jpeg?resize=42%2C42&#038;ssl=1 1x, https://i0.wp.com/pbs.twimg.com/profile_images/378800000414742385/e11e6436c9b51b27e41a0f139d5a2010_normal.jpeg?resize=63%2C63&#038;ssl=1 1.5x, https://i0.wp.com/pbs.twimg.com/profile_images/378800000414742385/e11e6436c9b51b27e41a0f139d5a2010_normal.jpeg?resize=84%2C84&#038;ssl=1 2x, https://i0.wp.com/pbs.twimg.com/profile_images/378800000414742385/e11e6436c9b51b27e41a0f139d5a2010_normal.jpeg?resize=126%2C126&#038;ssl=1 3x, https://i0.wp.com/pbs.twimg.com/profile_images/378800000414742385/e11e6436c9b51b27e41a0f139d5a2010_normal.jpeg?resize=168%2C168&#038;ssl=1 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://twitter.com/kishorekollucse" class="url" rel="ugc external nofollow">kishore.k (@kishorekollucse)</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-814">June 6, 2019 at 5:01 pm</a> </div> <p>Can you please help regarding DUKPT PINBLOCK Decryption.</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=814#respond" data-commentid="814" data-postid="138" data-belowelement="div-comment-814" data-respondelement="respond" data-replyto="Reply to kishore.k (@kishorekollucse)" aria-label="Reply to kishore.k (@kishorekollucse)">Reply</a></div> </div> </li><!-- #comment-## --> <li class="comment even thread-odd thread-alt depth-1 parent" id="comment-1568"> <div id="div-comment-1568" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://2.gravatar.com/avatar/26b20d19ec05beaa1f57181721e038c4db24d4f7cb77a5d307a5fcf928bfa12b?s=42&#038;d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://2.gravatar.com/avatar/26b20d19ec05beaa1f57181721e038c4db24d4f7cb77a5d307a5fcf928bfa12b?s=42&#038;d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://2.gravatar.com/avatar/26b20d19ec05beaa1f57181721e038c4db24d4f7cb77a5d307a5fcf928bfa12b?s=63&#038;d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://2.gravatar.com/avatar/26b20d19ec05beaa1f57181721e038c4db24d4f7cb77a5d307a5fcf928bfa12b?s=84&#038;d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://2.gravatar.com/avatar/26b20d19ec05beaa1f57181721e038c4db24d4f7cb77a5d307a5fcf928bfa12b?s=126&#038;d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://2.gravatar.com/avatar/26b20d19ec05beaa1f57181721e038c4db24d4f7cb77a5d307a5fcf928bfa12b?s=168&#038;d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn">Do An</cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-1568">August 20, 2021 at 2:48 pm</a> </div> <p>i just got an pay shield 9000 could u show me how i save a BDK to my HSM? Thanks you.</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=1568#respond" data-commentid="1568" data-postid="138" data-belowelement="div-comment-1568" data-respondelement="respond" data-replyto="Reply to Do An" aria-label="Reply to Do An">Reply</a></div> </div> <ol class="children"> <li class="comment byuser comment-author-arthurvdmerwe bypostauthor odd alt depth-2" id="comment-1706"> <div id="div-comment-1706" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=63&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=84&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=126&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=168&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://arthurvandermerwe.com" class="url" rel="ugc">arthurvdmerwe</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-1706">March 18, 2022 at 11:11 am</a> </div> <p>You will need to generate a BDK (A0 Command), and export it under the LMK. You do not save it to the HSM.</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=1706#respond" data-commentid="1706" data-postid="138" data-belowelement="div-comment-1706" data-respondelement="respond" data-replyto="Reply to arthurvdmerwe" aria-label="Reply to arthurvdmerwe">Reply</a></div> </div> </li><!-- #comment-## --> </ol><!-- .children --> </li><!-- #comment-## --> <li class="comment even thread-even depth-1 parent" id="comment-1700"> <div id="div-comment-1700" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://0.gravatar.com/avatar/c29edea55ba13c7514a235276834b68785fb5ab804afe3b95297e33405470b0c?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://0.gravatar.com/avatar/c29edea55ba13c7514a235276834b68785fb5ab804afe3b95297e33405470b0c?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://0.gravatar.com/avatar/c29edea55ba13c7514a235276834b68785fb5ab804afe3b95297e33405470b0c?s=63&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://0.gravatar.com/avatar/c29edea55ba13c7514a235276834b68785fb5ab804afe3b95297e33405470b0c?s=84&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://0.gravatar.com/avatar/c29edea55ba13c7514a235276834b68785fb5ab804afe3b95297e33405470b0c?s=126&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://0.gravatar.com/avatar/c29edea55ba13c7514a235276834b68785fb5ab804afe3b95297e33405470b0c?s=168&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn">Harold P</cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-1700">March 4, 2022 at 6:20 am</a> </div> <p>Hi Arthur,<br /> very useful post, thanks. I have a doubt, my boss want to Obtain BDK from a IPEK and KSN, Is it Possible ? Do you have any reference about this? </p> <p>thanks a lot bro.</p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=1700#respond" data-commentid="1700" data-postid="138" data-belowelement="div-comment-1700" data-respondelement="respond" data-replyto="Reply to Harold P" aria-label="Reply to Harold P">Reply</a></div> </div> <ol class="children"> <li class="comment byuser comment-author-arthurvdmerwe bypostauthor odd alt depth-2" id="comment-1704"> <div id="div-comment-1704" class="comment-body"> <div class="comment-author vcard"> <img alt='' src='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G' srcset='https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=42&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D42&#038;r=G 1x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=63&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D63&#038;r=G 1.5x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=84&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D84&#038;r=G 2x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=126&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D126&#038;r=G 3x, https://0.gravatar.com/avatar/348f4a382f4bf6e3e47950e950b68a777ca8894f20fdde38ad1073656a2f5f63?s=168&#038;d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D168&#038;r=G 4x' class='avatar avatar-42' height='42' width='42' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://arthurvandermerwe.com" class="url" rel="ugc">arthurvdmerwe</a></cite> <span class="says">says:</span> </div> <div class="comment-meta commentmetadata"> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comment-1704">March 18, 2022 at 10:51 am</a> </div> <p>This is not possible. The BDK encrypts the KSN; the ciphertext is the IPEK. i.e. $E_{BDK}(KSN) = IPEK$. Retrieving the BDK is equivalent to breaking the encryption scheme and deriving the key. </p> <div class="reply"><a rel="nofollow" class="comment-reply-link" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=1704#respond" data-commentid="1704" data-postid="138" data-belowelement="div-comment-1704" data-respondelement="respond" data-replyto="Reply to arthurvdmerwe" aria-label="Reply to arthurvdmerwe">Reply</a></div> </div> </li><!-- #comment-## --> </ol><!-- .children --> </li><!-- #comment-## --> </ol><!-- .comment-list --> <div id="respond" class="comment-respond"> <h3 id="reply-title" class="comment-reply-title">Leave a reply to <a href="#comment-321">Niall</a> <small><a rel="nofollow" id="cancel-comment-reply-link" href="/2015/05/30/dukpt-explained-with-examples/#respond">Cancel reply</a></small></h3><form action="https://arthurvandermerwe.com/wp-comments-post.php" method="post" id="commentform" class="comment-form" novalidate> <div id="comment-form__verbum" class="transparent"></div><div class="verbum-form-meta"><input type='hidden' name='comment_post_ID' value='138' id='comment_post_ID' /> <input type='hidden' name='comment_parent' id='comment_parent' value='321' /> <input type="hidden" name="highlander_comment_nonce" id="highlander_comment_nonce" value="b7f90b704e" /> <input type="hidden" name="verbum_show_subscription_modal" value="" /></div><p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="79f1d10d4f" /></p><p style="display: none !important;" class="akismet-fields-container" data-prefix="ak_"><label>&#916;<textarea name="ak_hp_textarea" cols="45" rows="8" maxlength="100"></textarea></label><input type="hidden" id="ak_js_1" name="ak_js" value="27"/><script>document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() );</script></p></form> </div><!-- #respond --> </div><!-- #comments --> </main><!-- #main --> </section><!-- #primary --> </div><!-- #content --> <footer id="colophon" class="site-footer default-max-width" role="contentinfo" aria-label="Footer"> <div class="widget-area"> <div class="widget-column footer-widget-1"> <section id="recent-posts-4" class="widget widget_recent_entries"> <h2 class="widget-title">Recent Posts</h2><nav aria-label="Recent Posts"> <ul> <li> <a href="https://arthurvandermerwe.com/2020/02/16/a-brief-comparison-of-as2805-and-key-blocks/">A brief comparison of AS2805 and (TR-31) Key&nbsp;Blocks</a> </li> <li> <a href="https://arthurvandermerwe.com/2020/01/19/what-is-the-random-oracle-model-and-why-should-you-care-part-5-a-few-thoughts-on-cryptographic-engineering/">What is the random oracle model and why should you care? (Part 5) — A Few Thoughts on Cryptographic&nbsp;Engineering</a> </li> <li> <a href="https://arthurvandermerwe.com/2019/02/21/attack-of-the-week-searchable-encryption-and-the-ever-expanding-leakage-function-a-few-thoughts-on-cryptographic-engineering/">Attack of the week: searchable encryption and the ever-expanding leakage function — A Few Thoughts on Cryptographic&nbsp;Engineering</a> </li> <li> <a href="https://arthurvandermerwe.com/2017/12/29/from-bi-linear-maps-to-searchable-encryption/">From Bi-Linear Maps to Searchable&nbsp;Encryption</a> </li> <li> <a href="https://arthurvandermerwe.com/2017/02/10/mutual-authentication-using-certificates/">Mutual Authentication using&nbsp;Certificates</a> </li> <li> <a href="https://arthurvandermerwe.com/2016/09/04/importing-zpk-and-zmk-into-thales-payshield-9000-hsm/">Importing ZPK and ZMK into Thales Payshield 9000&nbsp;HSM</a> </li> <li> <a href="https://arthurvandermerwe.com/2016/07/23/signature-and-certificate-based-key-injection-for-atm/">Signature and Certificate based key injection for&nbsp;ATM</a> </li> <li> <a href="https://arthurvandermerwe.com/2015/07/31/the-refund-vulnerability-of-as2805-and-eftpos/">The Refund vulnerability of AS2805 and&nbsp;EFTPOS</a> </li> <li> <a href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/" aria-current="page">DUKPT Explained with&nbsp;examples</a> </li> <li> <a href="https://arthurvandermerwe.com/2015/05/28/eftpos-initialisation-using-rsa-cryptography/">EFTPOS Initialisation using RSA&nbsp;Cryptography</a> </li> <li> <a href="https://arthurvandermerwe.com/2015/05/20/atm-pin-encryption-using-3des/">ATM Pin encryption using&nbsp;3DES</a> </li> <li> <a href="https://arthurvandermerwe.com/2015/03/03/implementing-as2805-part-3-using-a-thales-9000-and-python/">Implementing AS2805 Part 6 Host to Host Encryption using a Thales 9000 and&nbsp;Python</a> </li> <li> <a href="https://arthurvandermerwe.com/2015/01/04/typical-cryptography-in-as2805-explained/">Typical Cryptography in AS2805&nbsp;Explained</a> </li> <li> <a href="https://arthurvandermerwe.com/2014/12/02/thales-9000-and-as2805-interchange-commands/">Thales 9000 with AS2805 Interchange &amp; RSA EFTPOS&nbsp;Commands.</a> </li> <li> <a href="https://arthurvandermerwe.com/2014/08/06/thales-key-exchange-examples-and-troubleshooting/">Thales Key Exchange Examples and&nbsp;Troubleshooting</a> </li> <li> <a href="https://arthurvandermerwe.com/2014/08/06/testing-dukpt/">Testing DUKPT</a> </li> <li> <a href="https://arthurvandermerwe.com/2014/07/06/parsing-as25058583-messages/">Parsing AS2505/8583 Messages</a> </li> <li> <a href="https://arthurvandermerwe.com/2014/06/25/dynamic-key-exchange-models/">Dynamic Key Exchange&nbsp;Models</a> </li> <li> <a href="https://arthurvandermerwe.com/2014/06/25/doing-pin-translation/">Doing PIN Translation with&nbsp;DUKPT</a> </li> <li> <a href="https://arthurvandermerwe.com/2014/06/25/credit-vs-debit/">Credit vs Debit</a> </li> <li> <a href="https://arthurvandermerwe.com/2014/06/22/as2805-standards-for-eft/">AS2805 Standards for&nbsp;EFT</a> </li> <li> <a href="https://arthurvandermerwe.com/2014/06/22/trace-your-atm-transactions/">Trace your ATM&nbsp;Transactions</a> </li> </ul> </nav></section><section id="archives-6" class="widget widget_archive"><h2 class="widget-title">Archives</h2><nav aria-label="Archives"> <ul> <li><a href='https://arthurvandermerwe.com/2020/02/'>February 2020</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2020/01/'>January 2020</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2019/02/'>February 2019</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2017/12/'>December 2017</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2017/02/'>February 2017</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2016/09/'>September 2016</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2016/07/'>July 2016</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2015/07/'>July 2015</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2015/05/'>May 2015</a>&nbsp;(3)</li> <li><a href='https://arthurvandermerwe.com/2015/03/'>March 2015</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2015/01/'>January 2015</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2014/12/'>December 2014</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2014/08/'>August 2014</a>&nbsp;(2)</li> <li><a href='https://arthurvandermerwe.com/2014/07/'>July 2014</a>&nbsp;(1)</li> <li><a href='https://arthurvandermerwe.com/2014/06/'>June 2014</a>&nbsp;(5)</li> </ul> </nav></section><section id="wpcom_social_media_icons_widget-4" class="widget widget_wpcom_social_media_icons_widget"><h2 class="widget-title">Social</h2><ul><li><a href="https://www.linkedin.com/in/arthur-van-der-merwe-a7a96a27" class="genericon genericon-linkedin" target="_blank"><span class="screen-reader-text">LinkedIn</span></a></li><li><a href="https://github.com/Arthurvdmerwe" class="genericon genericon-github" target="_blank"><span class="screen-reader-text">GitHub</span></a></li></ul></section> </div> </div><!-- .widget-area --> <div class="site-info"> <a class="site-name" href="https://arthurvandermerwe.com/" rel="home">Cryptography &amp; Payments</a><span class="comma">,</span> <a href="https://wordpress.com/?ref=footer_blog" rel="nofollow">Blog at WordPress.com.</a> </div><!-- .site-info --> </footer><!-- #colophon --> </div><!-- #page --> <!-- --> <script src="//0.gravatar.com/js/hovercards/hovercards.min.js?ver=202448bd3d6792c97e42a81a9d5a5ba6e667b110f2a7530429ac15d169784a739a4e3d" id="grofiles-cards-js"></script> <script id="wpgroho-js-extra"> var WPGroHo = {"my_hash":""}; </script> <script crossorigin='anonymous' type='text/javascript' src='https://s2.wp.com/wp-content/mu-plugins/gravatar-hovercards/wpgroho.js?m=1610363240i'></script> <script> // Initialize and attach hovercards to all gravatars ( function() { function init() { if ( typeof Gravatar === 'undefined' ) { return; } if ( typeof Gravatar.init !== 'function' ) { return; } Gravatar.profile_cb = function ( hash, id ) { WPGroHo.syncProfileData( hash, id ); }; Gravatar.my_hash = WPGroHo.my_hash; Gravatar.init( 'body', '#wp-admin-bar-my-account', { i18n: { 'Edit your profile': 'Edit your profile', 'View profile': 'View profile', 'Sorry, we are unable to load this Gravatar profile.': 'Sorry, we are unable to load this Gravatar profile.', 'Profile not found.': 'Profile not found.', 'Too Many Requests.': 'Too Many Requests.', 'Internal Server Error.': 'Internal Server Error.', }, } ); } if ( document.readyState !== 'loading' ) { init(); } else { document.addEventListener( 'DOMContentLoaded', init ); } } )(); </script> <div style="display:none"> <div class="grofile-hash-map-1e5a0566295c26fed641fd2444da4bec"> </div> <div class="grofile-hash-map-f167480038418b0bebf7ac13818c9864"> </div> <div class="grofile-hash-map-1e5a0566295c26fed641fd2444da4bec"> </div> <div class="grofile-hash-map-fdbbb3e63eeae53f6a0ab00689e720a4"> </div> <div class="grofile-hash-map-5796dfa886dee92aed1fbbc996a95b58"> </div> <div class="grofile-hash-map-5796dfa886dee92aed1fbbc996a95b58"> </div> <div class="grofile-hash-map-101f70a7f6bfaa5846cd9836cf6eb220"> </div> <div class="grofile-hash-map-2fa9b1195b9c29c3f63a790247a28c7d"> </div> <div class="grofile-hash-map-d41d8cd98f00b204e9800998ecf8427e"> </div> <div class="grofile-hash-map-18ee3eb2483be6b03e6fda2aa87f4ab9"> </div> <div class="grofile-hash-map-f274736ad4ca10ccc88bacbc4b822f6b"> </div> <div class="grofile-hash-map-785979ec3d2933303e4fad8771d5d984"> </div> </div> <div id="actionbar" style="display: none;" class="actnbr-pub-seedlet actnbr-has-follow"> <ul> <li class="actnbr-btn actnbr-hidden"> <a class="actnbr-action actnbr-actn-comment" href="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/#comments"> <svg class="gridicon gridicons-comment" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M12 16l-5 5v-5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v9c0 1.1-.9 2-2 2h-7z"/></g></svg> <span>Comment </span> </a> </li> <li class="actnbr-btn actnbr-hidden"> <a class="actnbr-action actnbr-actn-reblog" href=""> <svg class="gridicon gridicons-reblog" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M22.086 9.914L20 7.828V18c0 1.105-.895 2-2 2h-7v-2h7V7.828l-2.086 2.086L14.5 8.5 19 4l4.5 4.5-1.414 1.414zM6 16.172V6h7V4H6c-1.105 0-2 .895-2 2v10.172l-2.086-2.086L.5 15.5 5 20l4.5-4.5-1.414-1.414L6 16.172z"/></g></svg><span>Reblog</span> </a> </li> <li class="actnbr-btn actnbr-hidden"> <a class="actnbr-action actnbr-actn-follow " href=""> <svg class="gridicon" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path clip-rule="evenodd" d="m4 4.5h12v6.5h1.5v-6.5-1.5h-1.5-12-1.5v1.5 10.5c0 1.1046.89543 2 2 2h7v-1.5h-7c-.27614 0-.5-.2239-.5-.5zm10.5 2h-9v1.5h9zm-5 3h-4v1.5h4zm3.5 1.5h-1v1h1zm-1-1.5h-1.5v1.5 1 1.5h1.5 1 1.5v-1.5-1-1.5h-1.5zm-2.5 2.5h-4v1.5h4zm6.5 1.25h1.5v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25z" fill-rule="evenodd"></path></svg> <span>Subscribe</span> </a> <a class="actnbr-action actnbr-actn-following no-display" href=""> <svg class="gridicon" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 4.5H4V15C4 15.2761 4.22386 15.5 4.5 15.5H11.5V17H4.5C3.39543 17 2.5 16.1046 2.5 15V4.5V3H4H16H17.5V4.5V12.5H16V4.5ZM5.5 6.5H14.5V8H5.5V6.5ZM5.5 9.5H9.5V11H5.5V9.5ZM12 11H13V12H12V11ZM10.5 9.5H12H13H14.5V11V12V13.5H13H12H10.5V12V11V9.5ZM5.5 12H9.5V13.5H5.5V12Z" fill="#008A20"></path><path class="following-icon-tick" d="M13.5 16L15.5 18L19 14.5" stroke="#008A20" stroke-width="1.5"></path></svg> <span>Subscribed</span> </a> <div class="actnbr-popover tip tip-top-left actnbr-notice" id="follow-bubble"> <div class="tip-arrow"></div> <div class="tip-inner actnbr-follow-bubble"> <ul> <li class="actnbr-sitename"> <a href="https://arthurvandermerwe.com"> <img loading='lazy' alt='' src='https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=50' srcset='https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=50 1x, https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=75 1.5x, https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=100 2x, https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=150 3x, https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=200 4x' class='avatar avatar-50' height='50' width='50' /> Cryptography &amp; Payments </a> </li> <div class="actnbr-message no-display"></div> <form method="post" action="https://subscribe.wordpress.com" accept-charset="utf-8" style="display: none;"> <div class="actnbr-follow-count">Join 30 other subscribers</div> <div> <input type="email" name="email" placeholder="Enter your email address" class="actnbr-email-field" aria-label="Enter your email address" /> </div> <input type="hidden" name="action" value="subscribe" /> <input type="hidden" name="blog_id" value="70204527" /> <input type="hidden" name="source" value="https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/?replytocom=321" /> <input type="hidden" name="sub-type" value="actionbar-follow" /> <input type="hidden" id="_wpnonce" name="_wpnonce" value="65c8d46265" /> <div class="actnbr-button-wrap"> <button type="submit" value="Sign me up"> Sign me up </button> </div> </form> <li class="actnbr-login-nudge"> <div> Already have a WordPress.com account? <a href="https://wordpress.com/log-in?redirect_to=https%3A%2F%2Fr-login.wordpress.com%2Fremote-login.php%3Faction%3Dlink%26back%3Dhttps%253A%252F%252Farthurvandermerwe.com%252F2015%252F05%252F30%252Fdukpt-explained-with-examples%252F">Log in now.</a> </div> </li> </ul> </div> </div> </li> <li class="actnbr-ellipsis actnbr-hidden"> <svg class="gridicon gridicons-ellipsis" height="24" width="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M7 12c0 1.104-.896 2-2 2s-2-.896-2-2 .896-2 2-2 2 .896 2 2zm12-2c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2zm-7 0c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2z"/></g></svg> <div class="actnbr-popover tip tip-top-left actnbr-more"> <div class="tip-arrow"></div> <div class="tip-inner"> <ul> <li class="actnbr-sitename"> <a href="https://arthurvandermerwe.com"> <img loading='lazy' alt='' src='https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=50' srcset='https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=50 1x, https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=75 1.5x, https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=100 2x, https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=150 3x, https://arthurvandermerwe.com/wp-content/uploads/2018/09/cropped-arthur4.png?w=200 4x' class='avatar avatar-50' height='50' width='50' /> Cryptography &amp; Payments </a> </li> <li class="actnbr-folded-customize"> <a href="https://arthurvandermerwe.wordpress.com/wp-admin/customize.php?url=https%3A%2F%2Farthurvandermerwe.wordpress.com%2F2015%2F05%2F30%2Fdukpt-explained-with-examples%2F%3Freplytocom%3D321"> <svg class="gridicon gridicons-customize" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M2 6c0-1.505.78-3.08 2-4 0 .845.69 2 2 2 1.657 0 3 1.343 3 3 0 .386-.08.752-.212 1.09.74.594 1.476 1.19 2.19 1.81L8.9 11.98c-.62-.716-1.214-1.454-1.807-2.192C6.753 9.92 6.387 10 6 10c-2.21 0-4-1.79-4-4zm12.152 6.848l1.34-1.34c.607.304 1.283.492 2.008.492 2.485 0 4.5-2.015 4.5-4.5 0-.725-.188-1.4-.493-2.007L18 9l-2-2 3.507-3.507C18.9 3.188 18.225 3 17.5 3 15.015 3 13 5.015 13 7.5c0 .725.188 1.4.493 2.007L3 20l2 2 6.848-6.848c1.885 1.928 3.874 3.753 5.977 5.45l1.425 1.148 1.5-1.5-1.15-1.425c-1.695-2.103-3.52-4.092-5.448-5.977z"/></g></svg> <span>Customize</span> </a> </li> <li class="actnbr-folded-follow"> <a class="actnbr-action actnbr-actn-follow " href=""> <svg class="gridicon" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path clip-rule="evenodd" d="m4 4.5h12v6.5h1.5v-6.5-1.5h-1.5-12-1.5v1.5 10.5c0 1.1046.89543 2 2 2h7v-1.5h-7c-.27614 0-.5-.2239-.5-.5zm10.5 2h-9v1.5h9zm-5 3h-4v1.5h4zm3.5 1.5h-1v1h1zm-1-1.5h-1.5v1.5 1 1.5h1.5 1 1.5v-1.5-1-1.5h-1.5zm-2.5 2.5h-4v1.5h4zm6.5 1.25h1.5v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25z" fill-rule="evenodd"></path></svg> <span>Subscribe</span> </a> <a class="actnbr-action actnbr-actn-following no-display" href=""> <svg class="gridicon" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 4.5H4V15C4 15.2761 4.22386 15.5 4.5 15.5H11.5V17H4.5C3.39543 17 2.5 16.1046 2.5 15V4.5V3H4H16H17.5V4.5V12.5H16V4.5ZM5.5 6.5H14.5V8H5.5V6.5ZM5.5 9.5H9.5V11H5.5V9.5ZM12 11H13V12H12V11ZM10.5 9.5H12H13H14.5V11V12V13.5H13H12H10.5V12V11V9.5ZM5.5 12H9.5V13.5H5.5V12Z" fill="#008A20"></path><path class="following-icon-tick" d="M13.5 16L15.5 18L19 14.5" stroke="#008A20" stroke-width="1.5"></path></svg> <span>Subscribed</span> </a> </li> <li class="actnbr-signup"><a href="https://wordpress.com/start/">Sign up</a></li> <li class="actnbr-login"><a href="https://wordpress.com/log-in?redirect_to=https%3A%2F%2Fr-login.wordpress.com%2Fremote-login.php%3Faction%3Dlink%26back%3Dhttps%253A%252F%252Farthurvandermerwe.com%252F2015%252F05%252F30%252Fdukpt-explained-with-examples%252F">Log in</a></li> <li class="actnbr-shortlink"><a href="https://wp.me/p4Kzp5-2e">Copy shortlink</a></li> <li class="flb-report"> <a href="https://wordpress.com/abuse/?report_url=https://arthurvandermerwe.com/2015/05/30/dukpt-explained-with-examples/" target="_blank" rel="noopener noreferrer"> Report this content </a> </li> <li class="actnbr-reader"> <a href="https://wordpress.com/read/blogs/70204527/posts/138"> View post in Reader </a> </li> <li class="actnbr-subs"> <a href="https://subscribe.wordpress.com/">Manage subscriptions</a> </li> <li class="actnbr-fold"><a href="">Collapse this bar</a></li> </ul> </div> </div> </li> </ul> </div> <script> window.addEventListener( "load", function( event ) { var link = document.createElement( "link" ); link.href = "https://s0.wp.com/wp-content/mu-plugins/actionbar/actionbar.css?v=20241015"; link.type = "text/css"; link.rel = "stylesheet"; document.head.appendChild( link ); var script = document.createElement( "script" ); script.src = "https://s0.wp.com/wp-content/mu-plugins/actionbar/actionbar.js?v=20231122"; script.defer = true; document.body.appendChild( script ); } ); </script> <script type="text/javascript"> window.WPCOM_sharing_counts = {"https:\/\/arthurvandermerwe.com\/2015\/05\/30\/dukpt-explained-with-examples\/":138}; </script> <link crossorigin='anonymous' rel='stylesheet' id='all-css-0-2' href='https://s2.wp.com/_static/??-eJyNzDEOgzAMheELNTUZQF2qHgVFjhWZJk5UO0K9fYtgZGB7//A+WJvDKkZiULpruScWhYWsBXwfDdoFZhaEREIf/h/0fN5R9QaXzVJjz6SwckxkClqRQ3aFIge322rfTBv7Kk8/PUbvx2Ealh973US5&cssminify=yes' type='text/css' media='all' /> <script id="verbum-settings-js-before"> window.VerbumComments = {"Log in or provide your name and email to leave a reply.":"Log in or provide your name and email to leave a reply.","Log in or provide your name and email to leave a comment.":"Log in or provide your name and email to leave a comment.","Receive web and mobile notifications for posts on this site.":"Receive web and mobile notifications for posts on this site.","Name":"Name","Email (address never made public)":"Email (address never made public)","Website (optional)":"Website (optional)","Leave a reply. (log in optional)":"Leave a reply. (log in optional)","Leave a comment. (log in optional)":"Leave a comment. (log in optional)","Log in to leave a reply.":"Log in to leave a reply.","Log in to leave a comment.":"Log in to leave a comment.","Logged in via %s":"Logged in via %s","Log out":"Log out","Email":"Email","(Address never made public)":"(Address never made public)","Instantly":"Instantly","Daily":"Daily","Reply":"Reply","Comment":"Comment","WordPress":"WordPress","Weekly":"Weekly","Notify me of new posts":"Notify me of new posts","Email me new posts":"Email me new posts","Email me new comments":"Email me new comments","Cancel":"Cancel","Write a comment...":"Write a comment...","Write a reply...":"Write a reply...","Website":"Website","Optional":"Optional","We'll keep you in the loop!":"We'll keep you in the loop!","Loading your comment...":"Loading your comment...","Discover more from":"Discover more from Cryptography & Payments","Subscribe now to keep reading and get access to the full archive.":"Subscribe now to keep reading and get access to the full archive.","Continue reading":"Continue reading","Never miss a beat!":"Never miss a beat!","Interested in getting blog post updates? Simply click the button below to stay in the loop!":"Interested in getting blog post updates? Simply click the button below to stay in the loop!","Enter your email address":"Enter your email address","Subscribe":"Subscribe","Comment sent successfully":"Comment sent successfully","Save my name, email, and website in this browser for the next time I comment.":"Save my name, email, and website in this browser for the next time I comment.","siteId":70204527,"postId":138,"mustLogIn":false,"requireNameEmail":false,"commentRegistration":false,"connectURL":"https:\/\/arthurvandermerwe.wordpress.com\/public.api\/connect\/?action=request&domain=arthurvandermerwe.com","logoutURL":"https:\/\/arthurvandermerwe.wordpress.com\/wp-login.php?action=logout&_wpnonce=b430c11aaa","homeURL":"https:\/\/arthurvandermerwe.com\/","subscribeToBlog":true,"subscribeToComment":true,"isJetpackCommentsLoggedIn":false,"jetpackUsername":"","jetpackUserId":0,"jetpackSignature":"","jetpackAvatar":"https:\/\/0.gravatar.com\/avatar\/ad516503a11cd5ca435acc9bb6523536?s=96","enableBlocks":true,"enableSubscriptionModal":true,"currentLocale":"en","isJetpackComments":false,"allowedBlocks":["core\/paragraph","core\/list","core\/code","core\/list-item","core\/quote","core\/image","core\/embed","core\/quote","core\/code"],"embedNonce":"90262dc7e7","verbumBundleUrl":"https:\/\/s2.wp.com\/wp-content\/mu-plugins\/jetpack-mu-wpcom-plugin\/sun\/vendor\/automattic\/jetpack-mu-wpcom\/src\/features\/verbum-comments\/dist\/index.js","isRTL":false,"vbeCacheBuster":1721244820,"iframeUniqueId":0} </script> <script crossorigin='anonymous' type='text/javascript' src='https://s1.wp.com/_static/??-eJx9j+FOwzAMhF+INJs6hPiBeBTkJl7n1k5CnKzq25PCNiGY9svS+buzzy7JuBgKhmIntRIHYjRVMcPYNEPhGLtJn+wvbuA4msR1pKB2idmDV+MYVFG3kAUK//VIvTmY5sZ9Vqx4guAZ8xWm4Lj6nxBPWuwZg495W6XI65GYO6HwIHvCksDNpklLclEuC6s1XMOglihQCrl/tNXs7FCJfYPzUKWdEGkn1G7l2vBrACFnOIK///fFYTImXu99W04oDU11sIrY6pdreHOnTAJ5NQHONEKh+KgszKSCxfTdzn60H27CMX/Dvnnf5W3/0u8P/a5/fp2+APZguQA='></script> <script id="crowdsignal-rating-js-before"> <!--//--><![CDATA[//><!-- PDRTJS_settings_7692610_post_138={"id":7692610,"unique_id":"wp-post-138","title":"DUKPT%20Explained%20with%26nbsp%3Bexamples","permalink":"https:\/\/arthurvandermerwe.com\/2015\/05\/30\/dukpt-explained-with-examples\/","item_id":"_post_138"}; if ( typeof PDRTJS_RATING !== 'undefined' ){if ( typeof PDRTJS_7692610_post_138 == 'undefined' ){PDRTJS_7692610_post_138 = new PDRTJS_RATING( PDRTJS_settings_7692610_post_138 );}} //--><!]]> </script> <script src="https://polldaddy.com/js/rating/rating.js?ver=14.1-a.8" id="crowdsignal-rating-js"></script> <script id="sharing-js-js-extra"> var sharing_js_options = {"lang":"en","counts":"1","is_stats_active":"1"}; </script> <script crossorigin='anonymous' type='text/javascript' src='https://s2.wp.com/wp-content/mu-plugins/jetpack-plugin/sun/_inc/build/sharedaddy/sharing.min.js?m=1685112397i'></script> <script id="sharing-js-js-after"> var windowOpen; ( function () { function matches( el, sel ) { return !! ( el.matches && el.matches( sel ) || el.msMatchesSelector && el.msMatchesSelector( sel ) ); } document.body.addEventListener( 'click', function ( event ) { if ( ! event.target ) { return; } var el; if ( matches( event.target, 'a.share-twitter' ) ) { el = event.target; } else if ( event.target.parentNode && matches( event.target.parentNode, 'a.share-twitter' ) ) { el = event.target.parentNode; } if ( el ) { event.preventDefault(); // If there's another sharing window open, close it. if ( typeof windowOpen !== 'undefined' ) { windowOpen.close(); } windowOpen = window.open( el.getAttribute( 'href' ), 'wpcomtwitter', 'menubar=1,resizable=1,width=600,height=350' ); return false; } } ); } )(); var windowOpen; ( function () { function matches( el, sel ) { return !! ( el.matches && el.matches( sel ) || el.msMatchesSelector && el.msMatchesSelector( sel ) ); } document.body.addEventListener( 'click', function ( event ) { if ( ! event.target ) { return; } var el; if ( matches( event.target, 'a.share-facebook' ) ) { el = event.target; } else if ( event.target.parentNode && matches( event.target.parentNode, 'a.share-facebook' ) ) { el = event.target.parentNode; } if ( el ) { event.preventDefault(); // If there's another sharing window open, close it. if ( typeof windowOpen !== 'undefined' ) { windowOpen.close(); } windowOpen = window.open( el.getAttribute( 'href' ), 'wpcomfacebook', 'menubar=1,resizable=1,width=600,height=400' ); return false; } } ); } )(); </script> <script> /(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); </script> <script type="text/javascript"> (function () { var wpcom_reblog = { source: 'toolbar', toggle_reblog_box_flair: function (obj_id, post_id) { // Go to site selector. This will redirect to their blog if they only have one. const postEndpoint = `https://wordpress.com/post`; // Ideally we would use the permalink here, but fortunately this will be replaced with the // post permalink in the editor. const originalURL = `${ document.location.href }?page_id=${ post_id }`; const url = postEndpoint + '?url=' + encodeURIComponent( originalURL ) + '&is_post_share=true' + '&v=5'; const redirect = function () { if ( ! window.open( url, '_blank' ) ) { location.href = url; } }; if ( /Firefox/.test( navigator.userAgent ) ) { setTimeout( redirect, 0 ); } else { redirect(); } }, }; window.wpcom_reblog = wpcom_reblog; })(); </script> <script type="text/javascript"> // <![CDATA[ (function() { try{ if ( window.external &&'msIsSiteMode' in window.external) { if (window.external.msIsSiteMode()) { var jl = document.createElement('script'); jl.type='text/javascript'; jl.async=true; jl.src='/wp-content/plugins/ie-sitemode/custom-jumplist.php'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(jl, s); } } }catch(e){} })(); // ]]> </script> <iframe src='https://widgets.wp.com/likes/master.html?ver=20241127#ver=20241127&amp;origin=https://arthurvandermerwe.com' scrolling='no' id='likes-master' name='likes-master' style='display:none;'></iframe> <div id='likes-other-gravatars' class='wpl-new-layout' role="dialog" aria-hidden="true" tabindex="-1"> <div class="likes-text"> <span>%d</span> </div> <ul class="wpl-avatars sd-like-gravatars"></ul> </div> <script src="//stats.wp.com/w.js?67" defer></script> <script type="text/javascript"> _tkq = window._tkq || []; _stq = window._stq || []; _tkq.push(['storeContext', {'blog_id':'70204527','blog_tz':'11','user_lang':'en','blog_lang':'en','user_id':'0'}]); _stq.push(['view', {'blog':'70204527','v':'wpcom','tz':'11','user_id':'0','post':'138','subd':'arthurvandermerwe'}]); _stq.push(['extra', {'crypt':'UE5VTUIlVktzQVNtcFdrRlVoJUNsa2NPNURmfG5zSmhZMEN8bjdYNV0taWs9cHxmT11SeS9OUk8zMWxReFZOJT1aTDhDdFZuP1dURDJjU3dIWFV0R2ZvXUJvYjBQLVNaTTd2SXduNnBKUkpHZU0vSCZBX3crMTk9RWl8fmpZY0ZvbnBjSWVHVm16Ui1BdFdYbXxFWS1HVStQVXFZNG13PUNHM1RNbltfdzZlVz1iK3xsfGtuUCw1OG5KbXosVjV6aFEzNldYR1l3QmFranpHWi1WK3lYS24uNlVSUDhpSnN6dnlGVEx6Nmw4JU15JXR3bWxJczFjJj9nbk8uSjJWVFhMdGc9JSww'}]); _stq.push([ 'clickTrackerInit', '70204527', '138' ]); </script> <noscript><img src="https://pixel.wp.com/b.gif?v=noscript" style="height:1px;width:1px;overflow:hidden;position:absolute;bottom:1px;" alt="" /></noscript> <script> ( function() { function getMobileUserAgentInfo() { if ( typeof wpcom_mobile_user_agent_info === 'object' ) { wpcom_mobile_user_agent_info.init(); var mobileStatsQueryString = ''; if ( wpcom_mobile_user_agent_info.matchedPlatformName !== false ) { mobileStatsQueryString += '&x_' + 'mobile_platforms' + '=' + wpcom_mobile_user_agent_info.matchedPlatformName; } if ( wpcom_mobile_user_agent_info.matchedUserAgentName !== false ) { mobileStatsQueryString += '&x_' + 'mobile_devices' + '=' + wpcom_mobile_user_agent_info.matchedUserAgentName; } if ( wpcom_mobile_user_agent_info.isIPad() ) { mobileStatsQueryString += '&x_' + 'ipad_views' + '=' + 'views'; } if ( mobileStatsQueryString != '' ) { new Image().src = document.location.protocol + '//pixel.wp.com/g.gif?v=wpcom-no-pv' + mobileStatsQueryString + '&baba=' + Math.random(); } } } document.addEventListener( 'DOMContentLoaded', getMobileUserAgentInfo ); } )(); </script> <script type='disabled' id='wp-enqueue-dynamic-script:wp-i18n:after:1'> wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } ); </script> <script> (function() { 'use strict'; const fetches = {}; const promises = {}; const urls = { 'wp-hooks': 'https://s0.wp.com/wp-content/plugins/gutenberg-core/v19.7.0/build/hooks/index.min.js?m=1732574862i&ver=84e753e2b66eb7028d38', 'wp-i18n': 'https://s0.wp.com/wp-content/plugins/gutenberg-core/v19.7.0/build/i18n/index.min.js?m=1732574862i&ver=bd5a2533e717a1043151', 'verbum': 'https://s2.wp.com/wp-content/mu-plugins/jetpack-mu-wpcom-plugin/sun/vendor/automattic/jetpack-mu-wpcom/src/build/verbum-comments/verbum-comments.js?m=1731953849i&minify=false&ver=97043884103359931e09' }; const loaders = { 'verbum': () => { fetchExternalScript('wp-hooks'); fetchExternalScript('wp-i18n'); fetchExternalScript('verbum'); promises['wp-hooks'] = promises['wp-hooks'] || loadWPScript('wp-hooks'); promises['wp-i18n'] = promises['wp-i18n'] || promises['wp-hooks'].then( () => loadWPScript('wp-i18n') ); promises['verbum'] = promises['verbum'] || promises['wp-i18n'].then( () => loadWPScript('verbum') ); return promises['verbum']; }, }; const scriptExtras = { 'wp-i18n': { translations: 0, before: 0, after: 1 }, }; window.WP_Enqueue_Dynamic_Script = { loadScript: (handle) => { if (!loaders[handle]) { console.error('WP_Enqueue_Dynamic_Script: unregistered script `' + handle + '`.'); } return loaders[handle](); } }; function fetchExternalScript(handle) { if (!urls[handle]) { return Promise.resolve(); } fetches[handle] = fetches[handle] || fetch(urls[handle], { mode: 'no-cors' }); return fetches[handle]; } function runExtraScript(handle, type, index) { const id = 'wp-enqueue-dynamic-script:' + handle + ':' + type + ':' + (index + 1); const template = document.getElementById(id); if (!template) { return Promise.reject(); } const script = document.createElement( 'script' ); script.innerHTML = template.innerHTML; document.body.appendChild( script ); return Promise.resolve(); } function loadExternalScript(handle) { if (!urls[handle]) { return Promise.resolve(); } return fetches[handle].then(() => { return new Promise((resolve, reject) => { const script = document.createElement('script'); script.onload = () => resolve(); script.onerror = (e) => reject(e); script.src = urls[handle]; document.body.appendChild(script); }); }); } function loadExtra(handle, pos) { const count = (scriptExtras[handle] && scriptExtras[handle][pos]) || 0; let promise = Promise.resolve(); for (let i = 0; i < count; i++) { promise = promise.then(() => runExtraScript(handle, pos, i)); } return promise; } function loadWPScript(handle) { // Core loads scripts in this order. See: https://github.com/WordPress/WordPress/blob/a59eb9d39c4fcba834b70c9e8dfd64feeec10ba6/wp-includes/class-wp-scripts.php#L428. return loadExtra(handle, 'translations') .then(() => loadExtra(handle, 'before')) .then(() => loadExternalScript(handle)) .then(() => loadExtra(handle, 'after')); } } )(); </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10