<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MyArch</title>
	<atom:link href="https://myarch.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://myarch.com</link>
	<description>Builds and bytes</description>
	<lastBuildDate>Thu, 27 Jul 2023 18:21:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.8</generator>
	<item>
		<title>NCPDP Learning Resources</title>
		<link>https://myarch.com/ncpdp-learning-resources/</link>
		
		<dc:creator><![CDATA[Alexander]]></dc:creator>
		<pubDate>Thu, 27 Jul 2023 18:21:24 +0000</pubDate>
				<category><![CDATA[NCPDP]]></category>
		<guid isPermaLink="false">https://myarch.com/?p=2624</guid>

					<description><![CDATA[NCPDP (National Council for Prescription Drug Programs) telecommunication standard specifies the format of pharmacy claims and other pharmacy-related transactions. NCPDP is a quirky legacy format that would feel alien to any modern-day developer or an IT person. For example, it uses non-printable separators and non-mnemonic two-character field identifiers; it relies on an obscure way to<p><a class="moretag" href="https://myarch.com/ncpdp-learning-resources/">Read More <i class="fas fa-arrow-right"></i></a></p>]]></description>
										<content:encoded><![CDATA[<p>NCPDP (National Council for Prescription Drug Programs) telecommunication standard specifies the format of pharmacy claims and other pharmacy-related transactions.</p>
<p>NCPDP is a quirky legacy format that would feel alien to any modern-day developer or an IT person.</p>
<p>For example, it uses non-printable separators and non-mnemonic two-character field identifiers; it relies on an obscure way to encode numbers with decimal points; it uses a mixture of variable and fixed length fields.</p>
<p>Nevertheless, the format is still widely used in the pharmacy space.</p>
<p>We published several posts to help anyone dealing with this pesky format quickly get up to speed:</p>
<ul>
<li>
        <a href="https://datainsight.health/ncpdp/intro/">NCPDP introduction in plain English</a>. If you know nothing about the NCPDP format, start here.
    </li>
<li>
        <a href="https://datainsight.health/posts/ncpdp-separators/">NCPDP separators</a>. This post explains the &#8220;non-printable&#8221; separator characters used to denote fields and records.
    </li>
<li>
        <a href="https://datainsight.health/edi/ncpdp/ncpdp-headers/">NCPDP headers</a>. NCPDP uses fixed-length transaction headers. The problem is there are two different versions of the same header. This post explains it all.
    </li>
<li>
        <a href="https://datainsight.health/ncpdp/claim-b1/">Interactive example of a pharmacy claim in NCPDP format</a>. This is an example of a typical pharmacy claim with a field-by-field explanation.
    </li>
</ul>
<p>Finally, we provide a completely free <a href="https://datainsight.health/ncpdp/viewer/">NCPDP viewer and file reader</a> to help you make sense of your NCPDP files.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>EDI and NCPDP Viewers and APIs</title>
		<link>https://myarch.com/edi-ncpdp-viewers-and-apis/</link>
		
		<dc:creator><![CDATA[Alexander]]></dc:creator>
		<pubDate>Tue, 27 Jun 2023 20:34:07 +0000</pubDate>
				<category><![CDATA[EDI]]></category>
		<guid isPermaLink="false">https://myarch.com/?p=2614</guid>

					<description><![CDATA[EDI is a legacy data format that is still widely used today for many business transactions, such as business orders and invoices. It is also a de-facto standard, endorsed by HIPAA, for transmitting administrative healthcare data, such as claims and payments. There are several flavors of EDI; X12 EDI is used in the US. This<p><a class="moretag" href="https://myarch.com/edi-ncpdp-viewers-and-apis/">Read More <i class="fas fa-arrow-right"></i></a></p>]]></description>
										<content:encoded><![CDATA[<p><a href="https://datainsight.health/edi/intro/">EDI</a> is a legacy data format that is still widely used today for many business transactions, such as business orders and invoices. It is also a de-facto standard, <a href="https://www.cms.gov/Regulations-and-Guidance/Administrative-Simplification/HIPAA-ACA/AdoptedStandardsandOperatingRules">endorsed by HIPAA</a>, for transmitting administrative healthcare data, such as claims and payments.</p>
<p>There are several flavors of EDI; X12 EDI is used in the US. <a href="https://datainsight.health/edi/intro/">This post</a> provides a good introduction to X12 EDI.</p>
<p>DataPower gateways have a B2B feature that enables the processing of X12 EDI.</p>
<p>We’ve developed several free tools to help deal with X12 EDI, especially when it comes to healthcare-specific EDI transactions. The tools are available from our sister website, <a href="https://datainsight.health/">Healthcare Data Insight</a>, along with <a href="https://datainsight.health/edi/">many examples</a> and tutorials.</p>
<p>Our tools also provide support for the <a href="https://datainsight.health/ncpdp/intro/">NCPDP telecommunication format</a>. NCPDP is the format (and the standard) used for pharmacy claims and related transactions in the pharmacy space. The NCPDP format conceptually resembles X12 EDI but uses completely different separators and data elements.</p>
<p>Here is our list of free EDI and NCPDP tools:</p>
<ul>
<li>
        <a href="https://datainsight.health/edi/viewer/">X12 EDI viewer and file reader</a>. The viewer converts any EDI input into a user-friendly format.<br />
        It provides a special business view (without EDI artifacts) for 837 (healthcare claim) and 835 (payment) transactions.<br />
        The viewer automatically decodes CPT, ICD-10, NDC, and other healthcare codes so that you can immediately see a code&#8217;s description. You can find multiple examples of the viewer in action <a href="https://datainsight.health/edi/claims/">here</a>.
    </li>
<li>
        <a href="https://datainsight.health/ncpdp/viewer/">NCPDP viewer and file reader</a>. The NCPDP viewer shares the user-friendly UI with our X12 EDI viewer and provides similar functionality adapted for the NCPDP format.
    </li>
<li>
        <a href="https://datainsight.health/posts/edi-json/">API to convert 837 and 835 X12 EDI transactions</a>. This free API consumes X12 EDI text and returns a claim or a payment business object. The schema of business objects is intuitive; it requires no knowledge of X12 EDI.
    </li>
<li>
        <a href="https://datainsight.health/clinsight/swagger-ui/index.html">API to convert text in NCPDP telecom format into JSON</a>.
    </li>
</ul>
<p>
We also provide a free <a href="https://datainsight.health/code-lookup/">healthcare code lookup tool</a> to make it easy to decipher healthcare codes, such as CPT, ICD-10, NDC, UB-04, and others.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>DataPower Buddy Release 3.5.2</title>
		<link>https://myarch.com/datapower-buddy-release-3-5-2/</link>
		
		<dc:creator><![CDATA[Alexander]]></dc:creator>
		<pubDate>Sat, 11 Mar 2023 01:59:02 +0000</pubDate>
				<category><![CDATA[DataPower]]></category>
		<category><![CDATA[DPBuddy]]></category>
		<guid isPermaLink="false">https://myarch.com/?p=2605</guid>

					<description><![CDATA[We&#8217;re pleased to announce the release of DPBuddy 3.5.2, our annual maintenance update of the tool. All DPBuddy&#8217;s dependencies (third-party libraries used by DPBuddy) have been refreshed. This includes removing and updating libraries with security vulnerabilities. DPBuddy has been tested with all the recent versions of Java, up to Java 19. Java 8 is the<p><a class="moretag" href="https://myarch.com/datapower-buddy-release-3-5-2/">Read More <i class="fas fa-arrow-right"></i></a></p>]]></description>
										<content:encoded><![CDATA[<p>We&#8217;re pleased to announce the release of DPBuddy 3.5.2, our annual maintenance update of the tool.</p>
<p>All DPBuddy&#8217;s dependencies (third-party libraries used by DPBuddy) have been refreshed.<br />
This includes removing and updating libraries with security vulnerabilities.</p>
<p>DPBuddy has been tested with all the recent versions of Java, up to Java 19. Java 8 is the lowest-supported Java version.</p>
<p>We have thoroughly tested DPBuddy 3.5.2 against the most recent DataPower firmware releases, including 10.5.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Comprehensive Certificate, Key and Password Inventory with DPBuddy</title>
		<link>https://myarch.com/dp-certificate-and-key-inventory/</link>
		
		<dc:creator><![CDATA[Alexander]]></dc:creator>
		<pubDate>Sun, 21 Jun 2020 19:14:48 +0000</pubDate>
				<category><![CDATA[Certificates]]></category>
		<category><![CDATA[DataPower]]></category>
		<category><![CDATA[DPBuddy]]></category>
		<guid isPermaLink="false">http://myarch.com/?p=2402</guid>

					<description><![CDATA[DPBuddy 3.5 supports in-depth inventory and analysis of your X.509 certificates and keys: Inventory of all your certificates, keys and password aliases across all of your appliances and domains. In addition to DataPower, the inventory includes certificates from TLS endpoints. Reports in Excel and text format Certificate deduplication &#8212; find all places where a given<p><a class="moretag" href="https://myarch.com/dp-certificate-and-key-inventory/">Read More <i class="fas fa-arrow-right"></i></a></p>]]></description>
										<content:encoded><![CDATA[<p>DPBuddy 3.5 supports <a href="/dpbuddy-docs/crypto_tasks.html#listcrypto">in-depth inventory and analysis</a> of your X.509 certificates and keys:</p>
<ul>
<li>
        Inventory of all your certificates, keys and password aliases across all of your appliances and domains.<br />
        In addition to DataPower, the inventory includes certificates from TLS endpoints.
    </li>
<li>
        Reports in Excel and text format
    </li>
<li>
        Certificate deduplication &#8212; find all places where a given certificate is used
    </li>
<li>
        See <a href="/dpbuddy-docs/auditing.html">audit records of all changes</a> &#8212; who changed what when
    </li>
<li>
        See how each of your crypto objects is used by other DataPower objects
    </li>
<li>
        See expiration for passwords/password aliases (in addition to certificates&#8217; expiration)
    </li>
<li>
        Ensure compliance and best practices: identify self-signed certificates, weak keys/algorithms, unapproved signers
    </li>
<li>
        Get alerted on certificate expiration, invalid signatures, revocation, policy violations
    </li>
</ul>
<p><span id="more-2402"></span><br />
Here are examples of various reports generated by the &#8220;listCrypto&#8221; command.</p>
<p>Certificates with their audit records. You can see that the same cert (lines 2-5) is deployed multiple times under different file names.<br />
The cert at line 5 was downloaded directly from the endpoint.</p>
<pre class="brush: plain; gutter: false; title: ; notranslate">
Domain          Object Name    File                     Subject CN           Alt Names                           Exp in Days Key Alg  Issuer                              Serial                                Changed On Changed By
dpbuddy-samples revoked_chain  cert:/revoked_chain.pem  revoked.badssl.com   revoked.badssl.com,www.revoked.bads         473 RSA-2048 DigiCert SHA2 Secure Server CA      4578095623763233818958520798617405692 6/20/20    aananiev
dpbuddy-samples myarch_chain   cert:/myarch_chain.pem   myarch.com           myarch.com,www.myarch.com                   493 RSA-2048 Go Daddy Secure Certificate Authori 11510493113533735686                  6/20/20    aananiev
dpbuddy-samples myarch         cert:/myarch.pem         myarch.com           myarch.com,www.myarch.com                   493 RSA-2048 Go Daddy Secure Certificate Authori 11510493113533735686                  6/20/20    aananiev
dpbuddy-samples myarch.com_443 cert:/myarch.com_443.pem myarch.com           myarch.com,www.myarch.com                   493 RSA-2048 Go Daddy Secure Certificate Authori 11510493113533735686                  6/20/20    aananiev
https://myarch.com:443                                  myarch.com           myarch.com,www.myarch.com                   493 RSA-2048 Go Daddy Secure Certificate Authori 11510493113533735686
dpbuddy-samples local-app      cert:/local-app.pem      local-app            local-app                                   326 RSA-2048 Local CA                            1589417790                            6/20/20    aananiev
dpbuddy-samples local_app      cert:/local_app.pem      local-app.com                                                    266 RSA-2048 local CA                            1584288750                            6/20/20    aananiev
dpbuddy-samples self_signed    cert:/self_signed.pem    localhost                                                       -523 RSA-2048 localhost                           9699314724490867386                   6/20/20    aananiev
dpbuddy-samples keypair-1      cert:/keypair-1.pem      test-key-1                                                      -278 RSA-2048 test-key-1                          1537189500                            6/20/20    aananiev
</pre>
<p>Results of the certificate compliance verification; reported in the &#8220;Problems&#8221; column</p>
<pre class="brush: plain; gutter: false; title: ; notranslate">
Object Name    File                     Subject CN         Exp in Days Key Alg  Issuer                              Serial                                Changed On Changed By Problems
revoked_chain  cert:/revoked_chain.pem  revoked.badssl.com         473 RSA-2048 DigiCert SHA2 Secure Server CA      4578095623763233818958520798617405692 6/20/20    aananiev   Duration exceeds,Ocsp revoked
myarch_chain   cert:/myarch_chain.pem   myarch.com                 493 RSA-2048 Go Daddy Secure Certificate Authori 11510493113533735686                  6/20/20    aananiev   Duration exceeds,Blacklisted issuer
myarch         cert:/myarch.pem         myarch.com                 493 RSA-2048 Go Daddy Secure Certificate Authori 11510493113533735686                  6/20/20    aananiev   Duration exceeds,Blacklisted issuer
myarch.com_443 cert:/myarch.com_443.pem myarch.com                 493 RSA-2048 Go Daddy Secure Certificate Authori 11510493113533735686                  6/20/20    aananiev   Duration exceeds,Blacklisted issuer
local-app      cert:/local-app.pem      local-app                  326 RSA-2048 Local CA                            1589417790                            6/20/20    aananiev
local_app      cert:/local_app.pem      local-app.com              266 RSA-2048 local CA                            1584288750                            6/20/20    aananiev
self_signed    cert:/self_signed.pem    localhost                 -523 RSA-2048 localhost                           9699314724490867386                   6/20/20    aananiev   Expired,Self signed
keypair-1      cert:/keypair-1.pem      test-key-1                -278 RSA-2048 test-key-1                          1537189500                            6/20/20    aananiev   Expired,Self signed
</pre>
<p>Certificate checks are configured in &#8220;crypto.conf&#8221; as following:</p>
<pre class="brush: plain; gutter: false; title: ; notranslate">
expiration: {
    days: 30
}
duration: {
    days: 365
}
selfSigned: {
    allow: false
}
sigVerification: {
    failIfNoIssuer: false
}
ocsp: {
    enabled: true
}
pubKey: {
    minSize: {RSA: 2048, EC: 256}
    allowedAlgs: &#x5B;RSA, EC]
}
</pre>
<p>Private keys with usages:</p>
<pre class="brush: plain; gutter: false; title: ; notranslate">
Object Name                  File                                   Usage
dp-myarch-key                cert:/dp_myarch.key                    CryptoIdentCred:dp-myarch-cred
datapower.myarch.com_privkey cert:/datapower.myarch.com_privkey.pem
local-app_privkey            cert:/local-app_privkey.pem
local-app-ss_privkey         cert:/local-app-ss_privkey.pem         CryptoIdentCred:datapower-local-ca, SSLServerProfile:dp-myarch-server, XMLFirewallService:OktaResourceOwnerFlow
sslserver                    cert:/sslserver-privkey.pem            CryptoIdentCred:sslserver, CryptoProfile:sslserver, SSLProxyProfile:sslserver, HTTPSSourceProtocolHandler:https_5041, MultiProtocolGateway:oauth-mpgw-rs
</pre>
<p>Password aliases with expiration and usages:</p>
<pre class="brush: plain; gutter: false; title: ; notranslate">
Location Domain          Object Name         Exp in Days Changed On Changed By Usage
dev      dpbuddy-samples self_signed_key-pwd             6/20/20    aananiev   CryptoKey:self_signed_key
dev      dpbuddy-samples oracle-pwd-alias             83 3/16/20    aananiev
dev      dpbuddy-samples keypair-1_key-pwd               6/20/20    aananiev   CryptoKey:keypair-1_key
dev      dpbuddy-samples service1-pwd-alias          -66 3/16/20    aananiev
dev      dpbuddy-samples service2-pwd-alias          -97 3/16/20    aananiev
</pre>
<p>The report in Excel format provides additional information, here is the snippet of the report:<br />
<img decoding="async" src="/files/dpbuddy/img/ExcelCryptoReport.png" alt="Crypto report in Excel format" /></p>
<p>More details are available in <a href="https://myarch.com/dpbuddy-docs-35/crypto_tasks.html#listcrypto">the documentation</a>.<br />
If you&#8217;re interested in fully automating your certificate and key management, please <a href="https://myarch.com/dpbuddy-contact-us">let us know</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Public Key Sizes and Their Importance</title>
		<link>https://myarch.com/public-key-sizes-and-their-importance/</link>
		
		<dc:creator><![CDATA[Alexander]]></dc:creator>
		<pubDate>Sun, 14 Jun 2020 18:53:53 +0000</pubDate>
				<category><![CDATA[Certificates]]></category>
		<category><![CDATA[security]]></category>
		<guid isPermaLink="false">http://myarch.com/?p=2394</guid>

					<description><![CDATA[A public key&#8217;s size and its algorithm is usually the first thing we see when we look at the &#8220;Public Key Info&#8221; section of an x.509 certificate. Can we evaluate security of a website or a digital signature based on its public key without any access to the private key? Turns out that we can,<p><a class="moretag" href="https://myarch.com/public-key-sizes-and-their-importance/">Read More <i class="fas fa-arrow-right"></i></a></p>]]></description>
										<content:encoded><![CDATA[<p>A public key&#8217;s size and its algorithm is usually the first thing we see when we look at the &#8220;Public Key Info&#8221; section of an x.509 certificate.</p>
<p>Can we evaluate security of a website or a digital signature based on its public key without any access to the private key?</p>
<p>Turns out that we can, at least, to a degree.</p>
<p>First, we need to understand that it&#8217;s the combination of the algorithm and the key size that defines the &#8220;strength&#8221; of the key. The most widely used public-key algorithm today is RSA. Elliptic Curve (EC) algorithms (that are truly superior to RSA) are quickly gaining ground and taking the second place.<br />
<span id="more-2394"></span><br />
As per <a href="https://csrc.nist.gov/Projects/Key-Management/key-management-guidelines">NIST definition</a>:</p>
<blockquote><p>
Cryptographic algorithms can provide different “strengths” of security, depending on the algorithm and the key size used (when keys are required by the algorithm). Security strength is a number associated with the amount of work (i.e., the number of operations) that is required to break a cryptographic algorithm or system.
</p></blockquote>
<p>The same document provides a handy summary of the strength of various popular algorithms/key sizes.</p>
<p>Roughly speaking, RSA-2048 (the de-facto today&#8217;s standard) is equal in strength to EC-255.</p>
<p>What about the relationship between the public key and its private key?</p>
<p>For both RSA and EC the size of the public key depends on the size of the private key. This dependency is <a href="https://cryptobook.nakov.com/asymmetric-key-ciphers/elliptic-curve-cryptography-ecc">less direct for EC</a> and pretty much <a href="https://stackoverflow.com/questions/19343022/can-a-public-key-have-a-different-length-encryption-than-the-private-key">one-to-one for RSA</a>, at least for TLS certificates.</p>
<p>This, of course, is only part of the story. For TLS, asymmetric cryptography is used only during the handshake phase of the TLS negotiation. As part of the handshake, the two parties agree on the symmetric key, which is actually much smaller than the asymmetric key. The algorithm and the size on the symmetric key depend on the supported <a href="https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4">cipher suites</a>.</p>
<p>For example, a TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 suite shows that the symmetric AES-256 key will be used for &#8220;bulk encryption&#8221;, that is, as the session key for encrypting the actual data.</p>
<p>More detailed explanation can be found <a href="https://www.thesslstore.com/blog/cipher-suites-algorithms-security-settings/">here</a>.</p>
<p>The public/private key strength is even more important for application-level protocols, like OAuth2/OpenID Connect. In this case, public-key cryptography is used for signing/verifying the signature of a JWT token (and, optionally, for its encryption).</p>
<p>JWT/OAuth2 uses a slightly different nomenclature for key sizes, specifically, the size is in bytes versus bits, e.g., RS256, which is the same with RSA-2048.</p>
<p>The key&#8217;s size/strength is also critical for any kind of data at rest encryption or in a situation when a digitally signed document can be stored for a prolonged period of time.</p>
<p>The size of a key is deemed sufficient only for some period of time until the hardware becomes more powerful to allow for cracking the crypto algorithm with brute force or other approaches. This is the reason why the key strength has been marching upwards for many years.</p>
<p>RSA-2048 is considered secure until 2030, but it could be just a guess, given <a href="https://en.wikipedia.org/wiki/Post-quantum_cryptography">advances in quantum computing</a>.</p>
<p>Imagine a digitally signed PDF contract (e.g., a real estate deed) that has to be stored for potentially tens of years. Currently, <a href="https://helpx.adobe.com/acrobat/using/digital-ids.html#digital_ids">Adobe digital ID</a> utilizes RSA-2048, so what if this algorithm becomes vulnerable five years from now?</p>
<p>The same problem applies to encrypted backups, disk encryption, and database encryption. In general, these use cases require stronger keys than the ones used for inherently transient TLS sessions and OAuth2 tokens.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Automating Crypto Deployment with DPBuddy</title>
		<link>https://myarch.com/automating-crypto-deployment-with-dpbuddy/</link>
		
		<dc:creator><![CDATA[Alexander]]></dc:creator>
		<pubDate>Sun, 24 May 2020 15:58:23 +0000</pubDate>
				<category><![CDATA[Certificates]]></category>
		<category><![CDATA[DataPower]]></category>
		<category><![CDATA[DPBuddy]]></category>
		<guid isPermaLink="false">http://myarch.com/?p=2374</guid>

					<description><![CDATA[DPBuddy 3.5 supports fully automated deployment of X.509 certificates and keys with the following capabilities: Deployment from standalone files in various formats (PEM, DER, PKCS8, etc.), encrypted and unencrypted. Deployment from Java keystores/truststores in various formats (JKS, PKSC12, etc.). You can specify a list of aliases to deploy a subset of certs/keys from a keystore.<p><a class="moretag" href="https://myarch.com/automating-crypto-deployment-with-dpbuddy/">Read More <i class="fas fa-arrow-right"></i></a></p>]]></description>
										<content:encoded><![CDATA[<p>DPBuddy 3.5 supports fully automated deployment of X.509 certificates and keys with the following capabilities:</p>
<ul>
<li>
Deployment from standalone files in <a href="https://myarch.com/public-private-key-file-formats">various formats</a> (PEM, DER, PKCS8, etc.), encrypted and unencrypted.
    </li>
<li>
Deployment from Java keystores/truststores in various formats (JKS, PKSC12, etc.). You can specify a list of aliases to deploy a subset of certs/keys from a keystore.
    </li>
<li>
Deployment directly from TLS endpoints to DataPower.
    </li>
<li>
Automatic deployment of issuers/CA certs. DPBuddy can also download the issuer from the certificate&#8217;s <a href="https://tools.ietf.org/html/rfc5280#section-4.2.2.1">AIA extension</a> if exists (all certs issued by known CAs will have that extension).
    </li>
<li>
Auditing of all changes to crypto objects directly on DataPower. You can see who changed what when using DPBuddy&#8217;s crypto reporting task.
    </li>
<li>
Keystores and key passwords can be stored encrypted in DPBuddy&#8217;s conf file or provided directly on the command line.
    </li>
<li>
Deployment is automatically validated to make sure all crypto objects and password aliases are up.
    </li>
<li>
Crypto Identity Credential objects are created automatically for cert-key keypairs from a keystore.
</li>
</ul>
<p>We&#8217;ve also developed a framework for integrating with your Key Management System of choice, such as <a href="https://www.vaultproject.io/">Hashicorp Vault</a> or <a href="https://aws.amazon.com/kms/">AWS Key Management Service</a>.</p>
<p>DPBuddy copies keys/cert files to DataPower (as PEM files) and creates DataPower crypto objects. The names derived either from filenames or from the names (aliases) in the keystore.</p>
<p>DPBuddy automatically determines if the source is a key or a cert and creates the crypto objects of the appropriate type.<br />
<span id="more-2374"></span><br />
All certs are de-duplicated to make sure that each unique cert is only deployed once. This comes handy when, for example, the same CA&#8217;s cert can be found in multiple keystores or files.</p>
<p>If a cert/key is password-protected, the password alias object is automatically created on DataPower with the same password.</p>
<p>Here are some examples.</p>
<p>Deploy certs and keys from various stand-alone files:</p>
<pre data-enlighter-language="shell" class="EnlighterJSRAW">
dpbuddy deployCrypto -dir crypto_files -includes &quot;*.pem *.cer *.key *.pkcs8&quot; -excludes &quot;myarch.pem&quot; -passwords &quot;self_signed:changeit&quot;
</pre>
<p>Deploy certs and keys from the keystore:</p>
<pre data-enlighter-language="shell" class="EnlighterJSRAW">
dpbuddy deployCrypto -file crypto_files/test_keystore.jks -ksNames &quot;local-app, keypair-1&quot; -passwords &quot;test_keystore:changeit,keypair-1:changeit&quot;
</pre>
<p>Deploy directly from an endpoint (including the issuer/CA certs)</p>
<pre data-enlighter-language="shell" class="EnlighterJSRAW">
dpbuddy deployCrypto -endpoint myarch.com
</pre>
<p>Deploy only the certs (and their issuers) that match certain domain name (e.g., &#8220;myarch.com&#8221;) in CN or in the <a href="https://myarch.com/mandatory-certificate-extensions/">alternative names extension</a>.</p>
<pre data-enlighter-language="shell" class="EnlighterJSRAW">
dpbuddy deployCrypto -subjects myarch.com -dir crypto_files -includes &quot;*.pem test_keystore.*&quot; -passwords &quot;-passwords &quot;\${crypto.passwd}&quot; -keys false
</pre>
<p>&#8220;${crypto.passwd}&#8221; variable points to the following line in dpbuddy.conf:<br />
crypto.passwd: &#8220;test_keystore:ENC{+MmRqtwXqYFpbpk9r3NTfrxMXR9m21xT}, keypair-1:ENC{+MmRqtwXqYFpbpk9r3NTfrxMXR9m21xT}&#8221;</p>
<p>More details are available in <a href="https://myarch.com/dpbuddy-docs-35/crypto_tasks.html#deploycrypto">the documentation</a>.</p>
<p>If you&#8217;re interested in fully automating your certificate and key management, please <a href="https://myarch.com/dpbuddy-contact-us">let us know</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Mandatory Certificate Extensions</title>
		<link>https://myarch.com/mandatory-certificate-extensions/</link>
		
		<dc:creator><![CDATA[Alexander]]></dc:creator>
		<pubDate>Fri, 15 May 2020 01:30:58 +0000</pubDate>
				<category><![CDATA[Certificates]]></category>
		<category><![CDATA[security]]></category>
		<guid isPermaLink="false">http://myarch.com/?p=2368</guid>

					<description><![CDATA[When you create certificates or certificate requests for a CA, your certificate must comply with certain standards, otherwise, it will be considered &#8220;non-standard&#8221;. On mac os you even get a warning that a website presents a non-standard certificate when you try to open the cert in Safari or Chrome (but not in Firefox). First of<p><a class="moretag" href="https://myarch.com/mandatory-certificate-extensions/">Read More <i class="fas fa-arrow-right"></i></a></p>]]></description>
										<content:encoded><![CDATA[<p>When you create certificates or certificate requests for a CA, your certificate must comply with certain standards, otherwise, it will be considered &#8220;non-standard&#8221;.</p>
<p>On mac os you even get a warning that a website presents a non-standard certificate when you try to open the cert in Safari or Chrome (but not in Firefox).</p>
<p>First of all, you must have the <a href="https://support.dnsimple.com/articles/what-is-ssl-san/">Subject Alternative Name (SAN)</a> extension, this extension must contain DNS names of all the domain names the certificate was issued for. Browsers no longer trust the &#8220;CN&#8221; of the subject field.</p>
<p>Your certificate must have a &#8220;Basic Constraints&#8221; extension marked as critical and specifying that the subject is not a CA.</p>
<p>Your certificate <a href="https://support.apple.com/en-us/HT210176">must also have</a> a non-critical &#8220;Extended key usage&#8221; extension specifying &#8220;TLS Web Server Authentication&#8221; (if your certificate is used by a server).</p>
<p>Another requirement is to provide a &#8220;Key Usage&#8221; extension (marked as critical) allowing for &#8220;Digital Signature&#8221; and &#8220;Key Encipherment&#8221;.</p>
<p>Finally, and this is just common sense, your certificate&#8217;s validity must be limited to <a href="https://www.sslshopper.com/cab-forum-reduces-max-cert-validity-to-825-days.html">825 days</a> (the shorter the better) and the RSA&#8217;s minimal acceptable key length is 2048.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The Easiest Way to Issue Certificates Using an Internal CA</title>
		<link>https://myarch.com/the-easiest-way-to-institute-an-internal-ca/</link>
		
		<dc:creator><![CDATA[Alexander]]></dc:creator>
		<pubDate>Wed, 13 May 2020 16:56:10 +0000</pubDate>
				<category><![CDATA[Certificates]]></category>
		<category><![CDATA[security]]></category>
		<guid isPermaLink="false">http://myarch.com/?p=2353</guid>

					<description><![CDATA[First, create your own internal CA. You can use excellent Keystore Explorer tool for that and all the subsequent actions; feel free to translate it to OpenSSL commands. Internal CA is really just a self-signed cert (keypair). Make sure to use proper extensions when creating it. At the very least, specify &#8220;Subject is a CA&#8221;<p><a class="moretag" href="https://myarch.com/the-easiest-way-to-institute-an-internal-ca/">Read More <i class="fas fa-arrow-right"></i></a></p>]]></description>
										<content:encoded><![CDATA[<p>First, create your own internal CA.<br />
You can use excellent <a href="https://keystore-explorer.org/">Keystore Explorer</a> tool for that and all the subsequent actions; feel free to translate it to OpenSSL commands.</p>
<p>Internal CA is really just a self-signed cert (keypair). Make sure to use proper extensions when creating it. At the very least, specify &#8220;Subject is a CA&#8221; in &#8220;Basic Constraints&#8221;.</p>
<p>Do not set CN in the subject so this keypair can never be used as a cert for actual domains.</p>
<p>CAs are allowed to have a long validity period, remember that you will need to reissue all the certs once the CA&#8217;s cert expires. However, we recommend limiting it to 5 years since you&#8217;d want to automate your cert provisioning anyway.</p>
<p>Keep your internal CA keypair in a separate keystore (Java) or in a completely separate place (ideally, in your centralized secrets/key manager). Never place the CA&#8217;s key in the same keystore with the certificate issued by this CA. Of course, the X509 of the CA could be widely distributed.</p>
<p>You can now start generating end-entity certs.</p>
<p>Create a new keypair (a self-signed cert) in the Keystore Explorer. </p>
<p>Your cert must have certain extensions, otherwise, it will be considered invalid, especially by <a href="https://support.apple.com/en-us/HT210176">mac OS browsers</a>.</p>
<p>At the very minimum, it <a href="/mandatory-certificate-extensions">must include</a> &#8220;Basic Constraints&#8221;, &#8220;Extended Key Usage&#8221;, &#8220;Key Usage&#8221;, &#8220;Subject Alternative Name&#8221; with the DNS names of your (internal) domains.</p>
<p>Note that browsers no longer trust the &#8220;CN&#8221; field and the &#8220;Subject Alternative Name&#8221; extension is a must.<br />
<span id="more-2353"></span><br />
The validity period cannot exceed <a href="https://www.sslshopper.com/cab-forum-reduces-max-cert-validity-to-825-days.html">825 days</a>, but the shorter the better. For internal certs, we recommend 90 days.</p>
<p>Now right-click on the new keypair and select &#8220;Generate new CSR&#8221;, save it to a file.</p>
<p>Now open the keystore with your local CA, right-click on the CA keypair and select &#8220;Sign CSR&#8221;. Remember that the private key is used for signing, whereas the signature can be validated with the CA&#8217;s public key (this how the whole certificate chain validation works)</p>
<p>Save the result in a p7r file which is a special format for CA&#8217;s responses. Do not forget to click on &#8220;Transfer extensions&#8221;, otherwise all the extensions in the original cert and in the CSR will be lost.</p>
<p>Now go back to the keystore with your self-signed cert keypair and select &#8220;Import response from CA&#8221;. Select the p7r file. You should now see your internal CA in the chain. Make sure that all the extensions are in place.</p>
<p>Save the keystore.</p>
<p>You can now import your internal CA into various browsers and when you navigate to your internal site, you should not see any security warnings.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Internal CA instead of Self-Signed Certificates</title>
		<link>https://myarch.com/internal-ca</link>
		
		<dc:creator><![CDATA[Alexander]]></dc:creator>
		<pubDate>Sat, 08 Feb 2020 19:54:49 +0000</pubDate>
				<category><![CDATA[Certificates]]></category>
		<category><![CDATA[security]]></category>
		<guid isPermaLink="false">http://myarch.com/?p=2344</guid>

					<description><![CDATA[TLS/SSL has become a de-facto protocol even for development and internal APIs. Many projects resort to self-signed/self-generated certificates. These certificates, however, have a large downside. It&#8217;s difficult to frequently refresh them since all the clients would have to update them at the same time so that they remain trusted. To minimize the effort, self-signed certificates<p><a class="moretag" href="https://myarch.com/internal-ca">Read More <i class="fas fa-arrow-right"></i></a></p>]]></description>
										<content:encoded><![CDATA[<p>TLS/SSL has become a de-facto protocol even for development and internal APIs.<br />
Many projects resort to <a href="/self-signed-certificates-best-practices/">self-signed/self-generated certificates</a>. These certificates, however, have a large downside. It&#8217;s difficult to frequently refresh them since all the clients would have to update them at the same time so that they remain trusted.</p>
<p>To minimize the effort, self-signed certificates are often issued for several years, which, of course, compromises security.</p>
<p>An internal Certificate Authority can be used instead to avoid the issue of updating expired self-signed end certificates.</p>
<p>An internal CA can be issued for multiple years, so there is no need for frequent updates across all clients.</p>
<p>An internal CA is really not much different from an &#8220;official&#8221; CAs like DigiCert. DigiCert would simply verify domain ownership before signing the certificate request. Once this is done, it would signs our certificate request thus creating a valid X.509 cert. The signature (usually using SHA256WITHRSA) is stored in a separate field in the X.509 cert as defined in <a href="https://tools.ietf.org/html/rfc5280#page-18">rfc5280</a>.</p>
<p>If needed, an internal CA could conduct a more in-depth verification of the request, including obtaining information on what kind of service the new certificate will be used for.</p>
<p>It can also mandate various extensions on key usage thus making the cert more secure. Of course, certificate duration can be reduced to six months or less; there is really no reason why a certificate should be valid for 12 months.<br />
<span id="more-2344"></span></p>
<p>Establishing a CA-level trust is convenient, however, it also requires to have a revocation process in place. This process could be based on good old CRL or OCSP.</p>
<p>You must have to have an ability to revoke a compromised cert, otherwise, the certificate and its private key can be used for nefarious purposes if the server is compromised.</p>
<p>There are many ways to implement OCSP/CRL, we offer a mechanism built into our DPBuddy/SecScan product.</p>
<p>Please make sure to properly guard the private key of the internal CA. It has to be stored separately from any certificates that it issues since it allows us to issue a cert for any internal domain.</p>
<p>The X.509 counterpart of the internal CA should be freely distributed to all trust stores of all the components of the system as well as to the browsers of the end-users of the application.</p>
<p>You you can use <a href="https://www.openssl.org/docs/man1.1.1/man1/ca.html">openssl CA command</a> to sign internal CSRs thus becoming your own certificate authority.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Key File Formats: DER, PEM and PKCS #12 Explained</title>
		<link>https://myarch.com/public-private-key-file-formats</link>
		
		<dc:creator><![CDATA[Alexander]]></dc:creator>
		<pubDate>Tue, 26 Nov 2019 16:41:40 +0000</pubDate>
				<category><![CDATA[Certificates]]></category>
		<category><![CDATA[secrets]]></category>
		<category><![CDATA[security]]></category>
		<guid isPermaLink="false">http://myarch.com/?p=2327</guid>

					<description><![CDATA[Public key cryptography (asymmetric cryptography) is the foundation of the Internet and it is used for a variety of purposes. Public and private keys can be stored in several different types of files. Each of these types can have its own encoding. The overall format of a file can be quite complex. It is important,<p><a class="moretag" href="https://myarch.com/public-private-key-file-formats">Read More <i class="fas fa-arrow-right"></i></a></p>]]></description>
										<content:encoded><![CDATA[<p>Public key cryptography (asymmetric cryptography) is the foundation of the Internet and it is used for a variety of purposes.</p>
<p>Public and private keys can be stored in several different types of files. Each of these types can have its own encoding. The overall format of a file can be quite complex. It is important, however, to understand the purpose of these formats, and how they&#8217;re used.</p>
<p>This document can be used as a primer for understanding these file/encoding formats.</p>
<p>The actual structure (objects and fields) of public/private keys, including X.509 certificates, is specified in various RFCs using the <a href="https://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One">ASN.1 notation</a>.</p>
<p>For example, an RSA private key contains the following fields:</p>
<pre data-enlighter-language="enlighter" class="EnlighterJSRAW">
RSAPrivateKey ::= SEQUENCE {
  version           Version,
  modulus           INTEGER,  -- n
  publicExponent    INTEGER,  -- e
  privateExponent   INTEGER,  -- d
  prime1            INTEGER,  -- p
  prime2            INTEGER,  -- q
  exponent1         INTEGER,  -- d mod (p-1)
  exponent2         INTEGER,  -- d mod (q-1)
  coefficient       INTEGER,  -- (inverse of q) mod p
  otherPrimeInfos   OtherPrimeInfos OPTIONAL
}
</pre>
<p>The most widely used format is X.509 and it&#8217;s full syntax is defined by the <a href="https://tools.ietf.org/html/rfc5280">RFC5280</a>. X.509 provides the support for the &#8220;chain of trust&#8221; to verify a public key, as well as various extensions, primarily concerning the key&#8217;s usage. RFC5280 also documents formats for CSR, CLR, etc.</p>
<p><a href="https://tools.ietf.org/html/rfc5208">PKCS #8 specification</a> defines the structure of private keys (PKCS stands for Public-Key Cryptography Standards).</p>
<p>These specifications only stipulate the structure (fields and objects), we still need to decide how to &#8220;encode&#8221; these fields when we want to save them on disk.</p>
<p>Security considerations aside, it would be nice if everything was stored in some sort of a structured format that we&#8217;re all used to, such as JSON or YAML, but this not the case for the majority of crypto formats, with the exception of JWK as explained later.<br />
<span id="more-2327"></span><br />
&#8220;DER&#8221; encoding, which is a variation of a more general <a href="https://en.wikipedia.org/wiki/X.690#DER_encoding">X.690  encoding</a>, is the de-facto standard for encoding ASN.1 structures. DER is a purely binary format, DER-encoded content can&#8217;t be inspected with a text editor. The basic idea of DER is to represent each field as a type+length+value triplet.</p>
<p>DER format is the one used for sending certificates over the wire &#8212; e.g., when a server presents its certificate to the client as part of the TLS handshake, the certificate bits are serialized using DER (theoretically, a certificate can be stored in a completely different format on disk).</p>
<p>DER can be further encoded using <a href="https://en.wikipedia.org/wiki/Base64">Base64</a>, which creates an ASCII text that could be copied-pasted, sent over email and so forth. Base64-encoded DER files are usually saved with the &#8220;pem&#8221; or &#8220;crt&#8221; extension. PEM files also contain a header and footer to give an idea of the content of the file (sort of poor man metadata). X.509 files use &#8220;&#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;&#8220;/&#8221;&#8212;&#8211;END CERTIFICATE&#8212;&#8211;&#8220;, but various other headers/footers can be used as well, such as &#8220;&#8212;&#8211;BEGIN PUBLIC KEY&#8212;&#8211;&#8220;/&#8221;&#8212;&#8211;END PUBLIC KEY&#8212;&#8211;&#8220;. In this last case, the file contains only the public key information and none of the additional X.509 fields.</p>
<p>Private keys can be saved in the PEM format as well, &#8220;&#8212;&#8211;BEGIN PRIVATE KEY&#8212;&#8211;&#8220;/&#8221;&#8212;&#8211;END PRIVATE KEY&#8212;&#8211;&#8221; is used to denote such files. All these headers as well the detailed PEM-encoding rules are documented in <a href="https://tools.ietf.org/html/rfc7468">this specification</a>.</p>
<p>ASN.1/DER/PEM is mostly used for TLS implementation and whenever X.509 certificates are involved.</p>
<p>Other public-key cryptography implementations can use different formats. Irrespective of the format, the underlying implementation and algorithms remain the same. E.g., an RSA public key must contain modulus and exponent fields, the only question is how to pass these fields around or how to store them in a file.</p>
<p><a href="https://jwt.io/">OAuth2 and JWT</a> use JSON to exchange public/private keys.<br />
Here is an example of a public key in the <a href="https://tools.ietf.org/html/rfc7517">JWK format</a> used by OAuth2 authorization servers:</p>
<pre data-enlighter-language="js" class="EnlighterJSRAW">
{
    &quot;kty&quot;: &quot;RSA&quot;,
    &quot;alg&quot;: &quot;RS256&quot;,
    &quot;kid&quot;: &quot;oViynWdKmd9m43BihjrQH9bHlp22fto0Nu-zwaBzUAs&quot;,
    &quot;use&quot;: &quot;sig&quot;,
    &quot;e&quot;: &quot;AQAB&quot;,
    &quot;n&quot;: &quot;q8BD_0q9JQRnpZ5vLnBMEA03nUWmxE56nGvKFY8K0fOAHojFPExI0Il67NEv6TCPZaXiifT5p9N9DIQl-JaWNaQmDCvd5Hbeugqn05QGJ14E_ghTXA6iXsONnavri5qlgc5rPmAS9zkm755ID7mHnuskEMXJy929LlxFKHzDRTkN8Lf1hSVXG8Mdy0f1QW-01VNRE8ZW0Ar5vLLuGrDb8bg9fCZXA6CK7oVJHXzo6ajIgzpa86kpdvWOhhtYPCL9P9wNjt4kfX3LBb6_sl9s8lI0C0OWtoMyNtAbE4wFc08o0ZsW1UGQin5eFFBuH_zbaPwc7wvYw40bBw35U_V9Sw&quot;
}
</pre>
<p>SSH keys (the ones that usually start with &#8220;ssh-rsa&#8221;) use their own form of encoding documented in the <a href="https://tools.ietf.org/html/rfc4253#section-6.6">RFC4253</a> &#8212; each component of a key is stored as length+data and the entire key is Base64 encoded. Note that this is different from DER encoding, which is type+length+value. <a href="https://blog.oddbit.com/post/2011-05-08-converting-openssh-public-keys/">This post</a> provides all the details.</p>
<p>It would obviously be a good idea to somehow encrypt and password-protect private keys. There are several formats that can be used for this purpose.</p>
<p>PKCS #8 files (usually encoded as PEM) files can be encrypted with a passphrase and various cyphers, in which case these file start with &#8220;&#8212;&#8211;BEGIN ENCRYPTED PRIVATE KEY&#8212;&#8211;&#8221; header.</p>
<p>The most widely used format for storing keys and certificates in an encrypted format is <a href="https://en.wikipedia.org/wiki/PKCS_12">PKCS #12</a>, defined by <a href="https://tools.ietf.org/html/rfc7292">RFC7292</a>. It can be used for storing certificates, public/private keys, and even arbitrary passwords. These files have &#8220;p12&#8221; or &#8220;pfx&#8221; extension (&#8220;pfx&#8221; is a PKCS #12 predecessor). Modern versions of Java use PKCS #12 as the default keystore format, although these files can still have the legacy &#8220;jks&#8221; extension.</p>
<p>Internally, PKCS #12 uses DER/ASN.1 structures for storing certificates and private keys.</p>
<p>For more recommendations on how to properly secure PKCS #12/JKS files, please refer to our keystore best practices <a href="/sec/java-keystore-management-best-practices/">post</a> and <a href="/cert-book/keystore_best_practices.html">the e-book</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
