jsrsasign is a opensource free pure JavaScript cryptographic library. This slide shows its features such like RSA/ECDSA signing, PKCS#1/8 private/public key, ASN.1, certificate, JWT/JWS/JWK for introduction.
The document outlines the syllabus for an Operating System course. It includes details like the textbook, references, assessment plan, university exam pattern, and course content. The course will cover operating system fundamentals like structures, system components, services, and system calls. It will also discuss topics like introduction to operating systems, their evolution, popular types, basics of UNIX and Windows, and networks operating systems. The first lecture will introduce operating systems and cover their key functions, structures, system architecture including CPU, RAM, buses, kernel, system calls, and the booting process.
ݺߣs from presentation: "Revoke-Obfuscation: PowerShell Obfuscation Detection (And Evasion) Using Science" originally released at Black Hat USA 2017 & DEF CON by @danielhbohannon and @Lee_Holmes.
For more information: http://www.danielbohannon.com/presentations/
Passiv im Prsens / Pr?teritum / Perfekt
Passiv mit Modalverben
PASSIVERSATZFORMEN
Niveau B2 / DaF
Theorie und Beispiele aus :
Aspekte neu / Mittelstufe Deutsch /
Lehrbuch B2 / Lektion 5 / Wissenschaft fr Kinder
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)Svetlin Nakov
?
Cryptography for Java Developers
Hashes, MAC, Key Derivation, Encrypting Passwords, Symmetric Ciphers & AES, Digital Signatures & ECDSA
About the Speaker
What is Cryptography?
Cryptography in Java C APIs and Libraries
Hashes, MAC Codes and Key Derivation (KDF)
Encrypting Passwords: from Plaintext to Argon2
Symmetric Encryption: AES (KDF + Block Modes + IV + MAC)
Digital Signatures, Elliptic Curves, ECDSA, EdDSA
Live demos and code examples: https://github.com/nakov/Java-Cryptography-Examples
Video (in Bulgarian language): https://youtu.be/ZG3BLXWVwJM
Blog: https://nakov.com/blog/2019/01/26/cryptography-for-java-developers-nakov-at-jprofessionals-jan-2019/
This document provides an overview of the basic function call flow for OpenSSL to establish a secure TCP connection. It discusses initializing the OpenSSL library, creating an SSL_CTX object, generating randomness, creating an SSL object for a connection, performing the TLS/SSL handshake, and reading and writing data over the encrypted connection. It also provides examples of OpenSSL code for a client application.
Elasticsearch And Apache Lucene For Apache Spark And MLlibJen Aman
?
This document summarizes a presentation about using Elasticsearch and Lucene for text processing and machine learning pipelines in Apache Spark. Some key points:
- Elasticsearch provides text analysis capabilities through Lucene and can be used to clean, tokenize, and vectorize text for machine learning tasks.
- Elasticsearch integrates natively with Spark through Java/Scala APIs and allows indexing and querying data from Spark.
- A typical machine learning pipeline for text classification in Spark involves tokenization, feature extraction (e.g. hashing), and a classifier like logistic regression.
- The presentation proposes preparing text analysis specifications in Elasticsearch once and reusing them across multiple Spark pipelines to simplify the workflows and avoid data movement between systems
This document provides an overview of the Elastic Stack including Elasticsearch, Logstash, Kibana, and Beats. It describes how each component works, key terminology, installation and configuration steps. It also demonstrates how to integrate the Elastic Stack for log analytics and security information and event management (SIEM) use cases including sending logs from Auditbeat, configuring file integrity monitoring, and alerting on log events using Elastalert.
The Secure Socket Layer protocol was created by Netscape to ensure secure transactions between web servers and browsers.
Most certificates in common use are based on the X.509 v3 certificate standard. First I open the shell with the openssl.exe and MS SDK tools.
Software is changing the world. CGC is a Common Gateway Coding as the name says, it is a "common" language approach for almost everything. I want to show how a multi-language approach to infrastructure as code using general purpose programming languages lets cloud engineers and code producers unlocking the same software engineering techniques commonly used for applications.
DEF CON 23: Stick That In Your (root)Pipe & Smoke ItSynack
?
DEF CON 23
You may ask; "why would Apple add an XPC service that can create setuid files anywhere on the system - and then blindly allow any local user to leverage this service?" Honestly, I have no idea!
The undocumented 'writeconfig' XPC service was recently uncovered by Emil Kvarnhammar, who determined its lax controls could be abused to escalate one's privileges to root. Dubbed rootpipe,' this bug was patched in OS X 10.10.3. End of story, right? Nope, instead things then got quite interesting. First, Apple decided to leave older versions of OS X un-patched. Then, an astute researcher discovered that the OSX/XSLCmd malware which pre-dated the disclosure, exploited this same vulnerability as a 0day! Finally, yours truly, found a simple way to side-step Apple's patch to re-exploit the core vulnerability on a fully-patched system. So come attend (but maybe leave your MacBooks at home), as we dive into the technical details XPC and the rootpipe vulnerability, explore how malware exploited this flaw, and then fully detail the process of completely bypassing Apple's patch. The talk will conclude by examining Apples response, a second patch, that appears to squash rootpipefor now.
The Security library in VisualWorks went through sweeping changes recently. Main change is replacing native smalltalk implementations of various cryptographic algorithms with pluggable interfaces to external libraries, but also a complete rewrite of the SSL implementation to support all current versions of the protocol (SSL3.0 & TLS 1.0, 1.1 and 1.2). Introducing dependencies on external libraries can complicate deployment, however the resulting pluggability of implementation and perfomance boost we're getting in exchange should more then pay off in terms of widening the scope of potential applications, where the purely native implementation was simply not acceptable. In this talk we will survey these changes and discuss their impact and backward compatibility implications.
The document discusses SSL/TLS (Secure Sockets Layer/Transport Layer Security), which are cryptographic protocols that provide secure communication over the internet. It covers SSL/TLS concepts like handshaking, encryption, authentication. It also describes JSSE (Java Secure Socket Extension), the Java implementation of SSL/TLS, including its architecture, classes and configuration. The document provides references for further reading on SSL/TLS and JSSE.
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)Svetlin Nakov
?
Cryptography for Java Developers
Hashes, MAC, Key Derivation, Encrypting Passwords, Symmetric Ciphers & AES, Digital Signatures & ECDSA
About the Speaker
What is Cryptography?
Cryptography in Java C APIs and Libraries
Hashes, MAC Codes and Key Derivation (KDF)
Encrypting Passwords: from Plaintext to Argon2
Symmetric Encryption: AES (KDF + Block Modes + IV + MAC)
Digital Signatures, Elliptic Curves, ECDSA, EdDSA
Live demos and code examples: https://github.com/nakov/Java-Cryptography-Examples
Video (in Bulgarian language): https://youtu.be/ZG3BLXWVwJM
Blog: https://nakov.com/blog/2019/01/26/cryptography-for-java-developers-nakov-at-jprofessionals-jan-2019/
This document provides an overview of the basic function call flow for OpenSSL to establish a secure TCP connection. It discusses initializing the OpenSSL library, creating an SSL_CTX object, generating randomness, creating an SSL object for a connection, performing the TLS/SSL handshake, and reading and writing data over the encrypted connection. It also provides examples of OpenSSL code for a client application.
Elasticsearch And Apache Lucene For Apache Spark And MLlibJen Aman
?
This document summarizes a presentation about using Elasticsearch and Lucene for text processing and machine learning pipelines in Apache Spark. Some key points:
- Elasticsearch provides text analysis capabilities through Lucene and can be used to clean, tokenize, and vectorize text for machine learning tasks.
- Elasticsearch integrates natively with Spark through Java/Scala APIs and allows indexing and querying data from Spark.
- A typical machine learning pipeline for text classification in Spark involves tokenization, feature extraction (e.g. hashing), and a classifier like logistic regression.
- The presentation proposes preparing text analysis specifications in Elasticsearch once and reusing them across multiple Spark pipelines to simplify the workflows and avoid data movement between systems
This document provides an overview of the Elastic Stack including Elasticsearch, Logstash, Kibana, and Beats. It describes how each component works, key terminology, installation and configuration steps. It also demonstrates how to integrate the Elastic Stack for log analytics and security information and event management (SIEM) use cases including sending logs from Auditbeat, configuring file integrity monitoring, and alerting on log events using Elastalert.
The Secure Socket Layer protocol was created by Netscape to ensure secure transactions between web servers and browsers.
Most certificates in common use are based on the X.509 v3 certificate standard. First I open the shell with the openssl.exe and MS SDK tools.
Software is changing the world. CGC is a Common Gateway Coding as the name says, it is a "common" language approach for almost everything. I want to show how a multi-language approach to infrastructure as code using general purpose programming languages lets cloud engineers and code producers unlocking the same software engineering techniques commonly used for applications.
DEF CON 23: Stick That In Your (root)Pipe & Smoke ItSynack
?
DEF CON 23
You may ask; "why would Apple add an XPC service that can create setuid files anywhere on the system - and then blindly allow any local user to leverage this service?" Honestly, I have no idea!
The undocumented 'writeconfig' XPC service was recently uncovered by Emil Kvarnhammar, who determined its lax controls could be abused to escalate one's privileges to root. Dubbed rootpipe,' this bug was patched in OS X 10.10.3. End of story, right? Nope, instead things then got quite interesting. First, Apple decided to leave older versions of OS X un-patched. Then, an astute researcher discovered that the OSX/XSLCmd malware which pre-dated the disclosure, exploited this same vulnerability as a 0day! Finally, yours truly, found a simple way to side-step Apple's patch to re-exploit the core vulnerability on a fully-patched system. So come attend (but maybe leave your MacBooks at home), as we dive into the technical details XPC and the rootpipe vulnerability, explore how malware exploited this flaw, and then fully detail the process of completely bypassing Apple's patch. The talk will conclude by examining Apples response, a second patch, that appears to squash rootpipefor now.
The Security library in VisualWorks went through sweeping changes recently. Main change is replacing native smalltalk implementations of various cryptographic algorithms with pluggable interfaces to external libraries, but also a complete rewrite of the SSL implementation to support all current versions of the protocol (SSL3.0 & TLS 1.0, 1.1 and 1.2). Introducing dependencies on external libraries can complicate deployment, however the resulting pluggability of implementation and perfomance boost we're getting in exchange should more then pay off in terms of widening the scope of potential applications, where the purely native implementation was simply not acceptable. In this talk we will survey these changes and discuss their impact and backward compatibility implications.
The document discusses SSL/TLS (Secure Sockets Layer/Transport Layer Security), which are cryptographic protocols that provide secure communication over the internet. It covers SSL/TLS concepts like handshaking, encryption, authentication. It also describes JSSE (Java Secure Socket Extension), the Java implementation of SSL/TLS, including its architecture, classes and configuration. The document provides references for further reading on SSL/TLS and JSSE.
Adventures in Underland: Is encryption solid as a rock or a handful of dust?Paula Januszkiewicz
?
Encryption is based on three principals: algorithm, key length, and storage. It has also become more popular and it is more often built into databases, networks, config files, OS, and users secrets. Is DPAPI and DPAPI-NG enough for us? Unfortunately there are many slip-ups that can be made. Come and learn if encrypted = or != safe and when! Tools included.
The document discusses Javascript Object Signing and Encryption (JOSE) standards being developed by the IETF to provide a framework for signing and encrypting JSON data in a secure manner. These include the JSON Web Key (JWK) format for representing cryptographic keys, the JSON Web Signature (JWS) format for signing payload data, and the JSON Web Encryption (JWE) format for encrypting payload data. The standards provide mechanisms for integrity protection and encryption of JSON content in a way that ensures interoperability.
Spark with Elasticsearch - umd version 2014Holden Karau
?
Holden Karau gave a talk on using Apache Spark and Elasticsearch. The talk covered indexing data from Spark to Elasticsearch both online using Spark Streaming and offline. It showed how to customize the Elasticsearch connector to write indexed data directly to shards based on partitions to reduce network overhead. It also demonstrated querying Elasticsearch from Spark, extracting top tags from tweets, and reindexing data from Twitter to Elasticsearch.
Node.js is an environment for developing high-performance web services using JavaScript on the server-side. It uses Google's V8 JavaScript engine and an event-driven, non-blocking I/O model that makes it lightweight and efficient, especially for real-time web applications with many concurrent connections. Common programming techniques in Node.js include asynchronous I/O with callbacks, event-driven programming, and a common module system for building reusable components.
The document summarizes key features of ECMAScript 2015 (ES6). It discusses classes, modules, arrow functions, default parameters, template literals, and block scoping with let and const. Classes provide clearer syntax for object creation and inheritance compared to ES5. Modules allow importing and exporting bindings. Arrow functions provide a concise syntax, preserve this binding, and cannot be called with new. Default parameters and template literals also introduce new functionality.
This document provides instructions on how to use SQL injection to execute operating system commands on a Microsoft SQL Server and retrieve a reverse shell within 30 minutes of a penetration test. It demonstrates exploiting SQL injection to execute a VBScript that downloads and executes a binary, providing remote code execution on the system through a reverse shell. Tricks are discussed like using VBPacker to obfuscate the payload and bypass outbound filtering. The ability to leverage this technique through other vulnerabilities like CSRF is also mentioned.
This API recognizes and reads a text embedded in pictures or photos.
Image to Text API uses a neural net (LSTM) based OCR engine which is focused on line
recognition, but also supports recognizing the character patterns.
It supports both handwriting and printed materials as well as street maps.
APILayer is an API marketplace where also your API can reach a broader audiences.
The document discusses symmetric key cryptography. It begins with an introduction to cryptography and encryption techniques like substitution ciphers. It then covers symmetric encryption in more detail, explaining block ciphers like DES and AES, as well as modes of operation like ECB, CBC, and OFB. It provides an example Java implementation of AES encryption and decryption. It also briefly covers stream ciphers like RC4 and the concept of steganography.
This document discusses creating REST APIs with Express, Node.js, and MySQL. It provides an overview of Express and its advantages. It then demonstrates how to set up a Node.js and MySQL environment, create an Express server, and implement API routes to GET, POST, DELETE, and PUT data from a MySQL database table. Code examples are provided to retrieve all todos, a single todo by ID, search todos by keyword, add a new todo, delete a todo, and update an existing todo.
Packer and TerraForm are fundamental components of Infrastructure as Code. I recently gave a talk at a DevOps meetup, which allowed me the opportunity to discuss the basics of these two tools, and how DevOps teams should be using them
Emancipatory Information Retrieval (Invited Talk at UCC)Bhaskar Mitra
?
Our world today is facing a confluence of several mutually reinforcing crises each of which intersects with concerns of social justice and emancipation. This talk will be a provocation for the role of computer-mediated information access in our emancipatory struggles. Information retrieval (IR) is a field in computing that concerns with the design of information access systems, such as search engines and recommender systems, and has traditionally been informed by other fields such as information science, human-computer interaction, and machine learning. I?define emancipatory information retrieval as the study and development of information access methods that challenge various forms of human oppression and situates its activities within broader collective emancipatory praxis. The term "emancipatory" here signifies the moral concerns of universal humanization of all peoples and the elimination of oppression to create the conditions under which we can collectively flourish. In this talk,?I will present an early framework of practices, projects, and design provocations for emancipatory IR, and will situate some of my own recent work within this framework. My goal is to propose a new framing that challenges the field of IR research to embrace humanistic values and commit to universal emancipation and social justice.?In this process, I believe we must both imagine post-oppressive worlds, and reimagine the role of IR in that world and in the journey that leads us there.
Don't just talk to AI, do more with AI: how to improve productivity with AI a...All Things Open
?
Presented at All Things Open AI 2025
Presented by Sheng Liang - Acorn Labs
Title: Don't just talk to AI, do more with AI: how to improve productivity with AI agents
Find more info about All Things Open:
On the web: https://www.allthingsopen.org/
Twitter: https://twitter.com/AllThingsOpen
LinkedIn: https://www.linkedin.com/company/all-things-open/
Instagram: https://www.instagram.com/allthingsopen/
Facebook: https://www.facebook.com/AllThingsOpen
Mastodon: https://mastodon.social/@allthingsopen
Threads: https://www.threads.net/@allthingsopen
Bluesky: https://bsky.app/profile/allthingsopen.bsky.social
2025 conference: https://2025.allthingsopen.org/
The Best of Both Worlds: Hybrid Clustering with Delta Lakecarlyakerly1
?
The Best of Both Worlds: Hybrid Clustering with Delta Lake
This deck walks you through best practices, real-world use cases, and hybrid approaches to help you maximize performance while keeping your creative freedom intact.
Video of full session: https://www.youtube.com/watch?v=0Gbq3B1FI-8
Open-Source GenAI vs. Enterprise GenAI: Navigating the Future of AI Innovatio...All Things Open
?
Presented at All Things Open AI 2025
Presented by Dr. Ruth Akintunde - SAS Institute Inc.
Title: Open-Source GenAI vs. Enterprise GenAI: Navigating the Future of AI Innovation
Abstract: This talk explores the critical differences between Open-Source Generative AI and Enterprise Generative AI, highlighting their respective strengths and challenges. Open-Source GenAI fosters innovation through community collaboration, accessibility, and adaptability, while Enterprise GenAI prioritizes security, scalability, and reliability. Key aspects such as cost, ethical considerations, and long-term sustainability are examined to understand their impact on AI development and deployment. Ultimately, the talk advocates for a hybrid approach, leveraging the best of both worlds to drive AI innovation forward.
Find more info about All Things Open:
On the web: https://www.allthingsopen.org/
Twitter: https://twitter.com/AllThingsOpen
LinkedIn: https://www.linkedin.com/company/all-things-open/
Instagram: https://www.instagram.com/allthingsopen/
Facebook: https://www.facebook.com/AllThingsOpen
Mastodon: https://mastodon.social/@allthingsopen
Threads: https://www.threads.net/@allthingsopen
Bluesky: https://bsky.app/profile/allthingsopen.bsky.social
2025 conference: https://2025.allthingsopen.org/
Best Crane Manufacturers in India Industry Leaders & Innovations.pdfHercules Hoists
?
Indias crane manufacturing industry is witnessing significant growth due to increasing infrastructure projects, industrial expansion, and technological advancements. Leading manufacturers focus on innovation, integrating automation and IoT-based monitoring systems to enhance operational efficiency. Companies produce a variety of cranes, including overhead, jib, and mobile cranes, tailored to different sectors like steel, power, and shipping. Indian manufacturers prioritize safety, adhering to international standards such as ISO and IS certifications. With a strong supply chain and competitive pricing, they cater to both domestic and global markets. The industrys emphasis on quality, reliability, and customization makes India a key player in crane manufacturing.
B2B SaaS - Reduce Churn using Proactive Support.pdfVijay Chandran
?
Churn can sink a B2B SaaS business65% of companies hover at 10% or less annually, but every loss counts. My new white paper, Reducing Churn in B2B SaaS Through Proactive Support, shows how acting before issues hit can save the day. Proactive supportthink check-ins and analyticscuts churn by 25-30%, with top firms hitting 5%. Check out this chart: [Insert Bar Chart: 5%-15% churn, most 10%]. Want to keep customers longer? Automate alerts and prioritize risks. Ive packed strategies, data, and real examples into this paper
IObit Driver Booster Pro Crack 12.2.0 with License Key [2025]jamesfolkner123
?
COPY & PASTE LINK???https://serialsofts.com/dl/ IOBIT Driver Booster Pro is an application that can update all the drivers and game components present on the computer.
UiPath Automation Developer Associate Training Series 2025 - Session 7DianaGray10
?
In session 7, you will learn about Orchestrator for Automation Developers and how this ties into the big picture.
For this session, you will need to take this self-paced training:
Orchestrator Overview for Automation Developers - 2 modules - 1h 30m - https://academy.uipath.com/courses/orchestrator-overview-for-automation-developers
?? For any questions you may have, please use the dedicated Forum thread. You can tag the hosts and mentors directly and they will reply as soon as possible.
Create a Beautiful Terminal for Windows ?Chris Wahl
?
Recording: https://www.youtube.com/watch?v=LiT3CyGrzvU
The complete setup of a Windows terminal environment using VS Code, PowerShell, and Windows Terminal. Learn how to install and configure Nerd Fonts, use Oh My Posh for stunning themes, and customize your PowerShell profile for an optimized development workflow. This tutorial covers everything from font selection, theme installation, setting up environments in VS Code and Windows Terminal, to maintaining and upgrading your tools seamlessly.
TrustArc Webinar: Strategies for Future-Proofing Privacy for HealthcareTrustArc
?
With increasing attention to healthcare privacy and enforcement actions proposed with the HIPPA Privacy Rules Changes planned for 2025, healthcare leaders must understand how to grow and maintain privacy programs effectively and have insights into their privacy methods.
Indeed, the healthcare industry faces numerous new challenges, including the rapid adoption of virtual health and other digital innovations, consumers increasing involvement in care decision-making, and the push for interoperable data and data analytics. How can the industry adapt?
Join our panel on this webinar as we explore the privacy risks and challenges the healthcare industry will likely encounter in 2025 and how healthcare organizations can use privacy as a differentiating factor.
This webinar will review:
- Current benchmarks of privacy management maturity in healthcare organizations
- Upcoming data privacy vulnerabilities and opportunities resulting from healthcares digital transformation efforts
- How healthcare companies can differentiate themselves with their privacy program
Women in Automation: Career Development & Leadership in AutomationUiPathCommunity
?
The month of March is a month when we focus on the women in our community: their expertise and their achievements. But also their potential for guidance and mentorship as we look to find role models and help our entire community reach its maximum potential, in a gender diverse and inclusive environment.
Join us on March 19 for a first hand story on starting an automation career and leadership orientation as a woman expert in the automation field.
Agenda:
Choosing a career in automation as a woman, despite having a strong background in core software development
How a strong background in core development can be leveraged to build a career in automation/digital transformation
Choosing a technical role in automation rather than non-technical positions as a woman
Leading teams as a woman in Turkeys tech industry
How professionals from fields other than computer engineering (both STEM and non-STEM) can transition into automation careers
Mentoring professionals from different fields in their automation careers
We are honored to have with us one of best women in automation advocates and professionals in Turkey:
??? Kardelen Cihangir, Technical Team Lead @VBM Turkey.
? If you have any questions or feedback, please refer to the "Women in Automation 2025" dedicated Forum thread. You can find there extra details and updates.
2. Table?of?Contents
Overview
How to use or install
RSA/DSA/ECDSA public key cryptography
Cryptographic Hash (SHA1/SHA2/MD5/RIPEMD160)
Message Authentication Code (HmacSHA1/SHA2/MD5)
short ASN.1 introduction
ASN1HEX: simple ASN.1 parser
X509: simple X.509 certi cate parser
generate and encode ASN.1
JSON Web Key/Signature/Token (JWK/JWS/JWT)
Tools, Demos, Tutorials and API Docs
3. Overview
The "jsrsasign" ( ) is a open source
free cryptograhic library implemented by pure JavaScript. It supports a
lot of features such as following:
strong RSA/DSA/ECDSA key utility
RSA/DSA/ECDSA digital signature
message authentication code(MAC)
hash (MD5,RIPEMD,SHA1,SHA2)
simple ASN.1 parser
ASN.1 object generator
X.509 certi cate and CRL
PKCS#1/5/8 private/public key
PKCS#10/CSR
CMS SignedData
RFC 3161 TimeStamp
CAdES long term signature
JWS (JSON Web Signatures)
JWT (JSON Web Token)
JWK (JSON Web Key)
string utility
https://kjur.github.io/jsrsasign/
4. Overview?(cont'd)
well-documented
"jsrsasign" has rich and so that you can learn
easily.
many samples and tools
"jsrsasign" provides many samples and tools.
easy installation
"jsrsasign" can be easily installed by "git clone", bower and npm.
There is no dependency to other package or module.
works on most of browsers and Node.js
"jsrsasign" doesn't require any special feature of JavaScript on the
browser such like W3C Web Crypto or Promise. This works on most
of browsers and Node.js as if old one.
MIT license
"jsrsasign" is licensed under "MIT License" which is short and
permissive for developers convenience.
API reference tutorial
6. How?to?use?or?install
For bower:
For Node.js:
O course, you can use git:
Or to use it in your web page, add following in your HTML:
% bower install jsrsasign
% npm install -g jsrsasign (for global installation)
% git clone https://github.com/kjur/jsrsasign.git
<script src=/slideshow/introduction-to-jsrsasign/65680143/"https:/kjur.github.io/jsrsasign/jsrsasign-
latest-all-min.js"></script>
8. KEYUTIL?class:?Features
supports RSA/DSA/ECC algorithm
generateKeypair() for RSA/ECC
getKey(): key loader
PKCS#1/5 plain/encryptped private/public PEM/HEX key
PKCS#8 plain/encryptped private/public PEM/HEX key
X.509 PEM certi cate
public/private RFC 7517 JSON Web Key (JWK)
getPEM() to get plain/encrypted private/public PKCS#1/5/8 PEM
getJWKFromKey() to get RFC 7517 JSON Web Key (JWK)
9. KEYUTIL.generateKeypair()
generateKeypair method can be used to generate RSA/ECC key pair.
// RSA
keypair = KEYUTIL.generateKeypair("RSA", 2048);
// ECC
keypair = KEYUTIL.generateKeypair("EC", "secp256r1");
//
// private key object: keypair.prvKeyObj
// public key object: keypair.pubKeyObj
10. KEYUTIL.getKey()
getKey method can load a lot of format of public and private key such
as PKCS#1/5/8 or JWK very easily.
// PKCS#8 public key
pub = KEYUTIL.getKey("-----BEGIN PUBLIC KEY...");
// public key from X.509 certi cate
pub = KEYUTIL.getKey("-----BEGIN CERTIFICATE...");
// PKCS#8 encrypted private with password
prv = KEYUTIL.getKey("-----BEGIN ENCRYPTED PRIVATE KEY...", "pass");
11. sign?data
sign a data with your private key using Signature object as like Java JCE.
// load private key
prv = KEYUTIL.getKey("-----BEGIN ENCRYPTED PRIVATE KEY...", "pass");
// generate Signature object
sig = new KJUR.crypto.Signature({"alg": "SHA256withRSA"});
// set private key for sign
sig.init(prv);
// update data
sig.updateString("aaa");
// calclate signature
sigHex = sig.sign();
12. verify?signature
sign a data with your private key using Signature object as like Java JCE.
// load public key
pub = KEYUTIL.getKey("-----BEGIN CERTIFICATE...");
// generate Signature object
sig = new KJUR.crypto.Signature({"alg": "SHA256withRSA"});
// set private key for sign
sig.init(pub);
// update data
sig.updateString("aaa");
// verify signature
isValid = sig.verify(sigValueHex);
14. calculate?hash?by
MessageDigest?class
calculate hash using MessageDigest class just like Java JCE
// generate MessageDigest object for SHA384
md = new KJUR.crypto.MessageDigest({alg: "sha384"});
// append data for hash
md.updateString("aaa");
// calculate hash nally
mdHex = md.digest();
// or use Util class in short. These three will get the same result.
mdHex = KJUR.crypto.Util.sha384("aaa");
mdHex = KJUR.crypto.Util.hashString("aaa","sha384");
mdHex = KJUR.crypto.Util.hashHex("616161","sha384");
16. calculate?Mac?by?Mac?class
calculate message authentication code by Mac class just like Java JCE
// generate Mac class
mac = new KJUR.crypto.Mac({alg: "HmacSHA256", pass: "pass"});
// append data for Mac
mac.updateString('aaa');
// get Mac value
macHex = md.doFinal();
pass parameter supports some value formats like this:
hexadecimal {hex: "616161"}
UTF-8 {utf8: "|"}
Base64 {b64: "Mi02/+...a=="}
Base64URL {b64u: "Mi02_-...a"}
18. short?ASN.1?introduction
ASN.1 is a binary encording of structured data consists of a data type
tag(T), byte length(L) and value(V).
ASN.1 encoding is used in network protocol or format such like X.509
certi cate, private/public key formats, S/MIME data, digital time stamp,
Radius.
FEATURE1: variable length data exceeds int or long.
FEATURE2: structured data is also available.
23. ASN1HEX?for?decendant
element
To refer a decendant element of nested structured ASN.1, use "nthList"
which represent indexes for each nested layer. This is very useful to
specify a deep nested element such like subject name of X.509
certi cate.
getDecendantHexTLVByNthList(s,0,[0,0]) "020104"
getDecendantHexLByNthList(s,0,[0,0]) "01"
getDecendantHexVByNthList(s,0,[0,0]) "04"
getDecendantIndexByNthList(s,0,[0,0]) 8
25. X509?class
Basic?fields?and?extensions?can?be?get?by?X509?class.
x = new X509();
x.readCertPEM(sCertPEM);
hex = X.509.pemToHex(sCertPEM);
// get subject
subject = x.getSubjectString(); // return like "/C=US/O=OTEST"
// get subjectAltName
san = X.509.getExtSubjectAltName(hex);
// return like ["example.com", "example.org"]
There are a lot of methods to get elds and extensions.
Please see in detail.manual
27. generate?and?encode?ASN.1?(cont'd)
Classes for ASN.1 primitives and structured types, as well as X.509
certi cate, CRL, CSR, CMS signed data, digital time stamp and CAdES are
de ned in jsrsasign.
i1 = new KJUR.asn1.DERInteger({int: 234});
s1 = new KJUR.asn1.DERUTF8String({str: 'Tokyo'}});
seq = new KJUR.asn1.DERSequence({array: [i1, s1]});
hex = seq.getEncodedHex();
Please see in detail.
It's very similar to BoucyCastle or IAIK Java ASN.1 classes.
However, there is much more easy way...
manual
28. generate?and?encode?ASN.1?using
newObject
It's very easy to generate complicated ASN.1 object by
ASN1Util.newObject
var hex = new KJUR.asn1.ASN1Util.newObject(
{seq: [// SEQUENCE
{int: 234},// INTEGER
{utf8str: 'Tokyo'}// UTF8String
]}
).getEncodedHex();
29. get?PEM?of?X.509?certificate?by
X509Util.newCertPEM
It's very easy to generate PEM of X.509 certi cate by
.
pem = new KJUR.asn1.x509.X509Util.newCertPEM({
serial: {int: 4},
sigalg: {name: 'SHA256withECDSA', paramempty: true},
issuer: {str: '/C=US/O=CA1'},
notbefore: {str: '130504235959Z'}, notafter: {str: '140504235959Z'},
subject: {str: '/C=US/O=T1'},
sbjpubkey: "-----BEGIN PUBLIC KEY...",
ext: [
{basicConstraints: {cA: true, critical: true}},
{keyUsage: {bin: '11'}},
],
cakey: ["-----BEGIN PRIVATE KEY...", "pass"]
});
X509Util.newCertPEM
30. get?PEM?of?PKCS#10/CSRT?by
CSRUtil.newCSRPEM
It's very easy to generate PEM of CSR(certi cate signing request) by
.
kp = KEYUTIL.generateKeypair("RSA", 2048);
pem = new KJUR.asn1.csr.CSRUtil.newCSRPEM({
subject: {str: '/C=US/O=Test/CN=example.com'},
sbjpubkey: kp.pubKeyObj,
sigalg: "SHA256withRSA",
sbjprvkey: kp.prvKeyObj
});
CSRUtil.newCSRPEM
33. JWS?(JSON?Web?Signatures)
jsrsasign can sign and verify RFC 7515 JSON Web Signatures (JWS).
// sign JWS
header = {alg: "HS256"};
payload = {fruit: "orange"};
jws = KJUR.jws.JWS.sign("HS256", header, payload, {utf8: "secret"});
// eyJhbGciOiJIUzI1NiJ9.eyJmcnVpdCI6Im9yYW5nZSJ9.
// qbIF5WMbXYMFMh_UXjL2CGts5KPVU7yF7AbOdoyoPZI
// verify JWS
isValid = KJUR.jws.JWS.verify(jws, {utf8: "secret"}, ["HS256"]);
This result can also be veri ed at .jwt.io
38. Tools?and?demos
jsrsasign provides a lot of tools which use
jsrsasign as example.
Please see the as for onliene
tools.
Also see as for Node tools.
As for demonstrations, please see
.
this list
list
this list