Code Signing

Top Code Signing tools for 2023

Read Time: 10 minutes

As we live in the digital era, software security has become a critical concern in software development. With the increasing frequency and complexity of cybersecurity threats, developers must take proactive measures to safeguard their software and users. Digital signing using a code signing tool is an essential approach to ensure software security. By doing so, developers can add a layer of protection that verifies the authenticity and integrity of the software, preventing malicious attacks and ensuring user trust.

What is a Code Signing tool?

A code signing tool is a software application utilized in digitally signing software code or executable files. This process involves utilizing a cryptographic algorithm to generate a digital signature of the code. The digital signature can then be verified by operating systems or other software tools to ensure the integrity and authenticity of the code.

Code signing is a fundamental security measure that guarantees the authenticity of software code by affixing the developer’s digital signature. This security measure safeguards the code from tampering or modification and prevents malware or other security threats from infiltrating the software code and causing damage to systems or networks.

Software developers and publishers typically rely on code signing tools to sign their code before distributing it to end-users. Similarly, security professionals or IT administrators can use these tools to verify the digital signatures of code to ensure its safety during installation or execution.

Examples of widely used code signing tools include Microsoft Authenticode, Java Code Signing, and Apple Code Signing. These tools necessitate a digital certificate issued by a trusted third-party certificate authority to establish trust in the digital signature and ensure that the code remains untampered.

Code Signing Tools Use Cases

Code signing tools are a critical security measure for ensuring the authenticity and integrity of software code. The following are some typical use cases for code signing tools:

  • Software Development

    During the development process, software developers commonly use code signing tools to sign their code before distributing it to end-users. This helps ensure that the code has not been tampered with or modified since signing and provides assurance that the software is safe to use.

  • Code Authentication

    The code signature of a software piece verifies the identity of the creator, guarding against malware such as trojans that impersonate legitimate software to gain access to a computer.

  • Prevention from Supply Chain Attacks

    Code signing tools safeguard software from supply chain attacks by verifying its authenticity and integrity. Here are some ways in which code-signing tools protect against supply chain attacks:

    • Authentication

      Code signing tools use digital certificates to authenticate the identity of the software developer.

    • Integrity and Verification

      Code signing tools use hash algorithms to create a unique signature for the software and verify whether the code has been corrupted.

    • Revocation

      If a code signing certificate is compromised, the certificate authority can revoke it, rendering any software signed with it invalid.

    • Operating System and Driver Updates

      Operating system and device driver manufacturers use code signing tools to sign their updates before releasing them to the public.

However, these benefits are contingent on the code signing process’s security. If an attacker can obtain signing keys or convince a company to sign their malicious code, it may appear legitimate to users. Thus, caution must be exercised during code signing to ensure the authenticity and integrity of the code.

Top Code Signing Tools in 2023

Code signatures are an essential security measure for verifying the authenticity and integrity of software code, and various tools are available for generating them. Here are some of the most commonly used tools for generating code signatures:

Encryption Consulting’s Code Sign Secure

Codesign Secure offers a secure and flexible code-signing solution for all operating systems, including Windows, Linux, Macintosh, Docker, and Android/iOS apps. With tamper-proof key storage and complete visibility and control over code-signing activities,

Codesign Secure helps customers stay ahead of the curve in today’s ever-evolving threat landscape.

Key Features consist of

  • Restrict access only to authorized users.
  • Avoid performance bottlenecks with Encryption Consulting’s state-of-the-art custom integrations.
  • Well-defined management of private keys to avoid local storage on local build machines.
  • Integration with leading hardware security module (HSM) vendors.

Advantages

  • Private keys of the code-signing certificate can be stored in an HSM to eliminate the risks associated with stolen, corrupted, or misused keys.
  • Client-side hashing ensures build performance and avoids unnecessary movement of files to provide greater security.
  • Supports customized workflows of an “M of N” quorum with multi-tier support of approvers.

Microsoft SignTool

microsoft

Microsoft SignTool, a command-line tool included in the Windows SDK, is used to create digital signatures for executable, dynamic link library, and driver files. These digital signatures contain a hash of the file and a digital certificate issued by a trusted authority, which Windows uses to verify the file’s integrity and authenticity.

One key advantage of Microsoft SignTool is its compatibility as a command-line tool, making it easily usable for a wide range of users. Executables signed using Microsoft SignTool are also trusted by Windows, which eliminates security warnings for users during installation.

Key Features and Advantages of Microsoft SignTool include

  • Command-line tool for ease of use and compatibility.
  • Trusted by Windows, eliminating security warnings for users during installation.
  • Ability to sign executable, dynamic link library, and driver files.
  • Digital signatures include hash of the file and digital certificate issued by a trusted authority.

Limitations

  • Limited functionality is a drawback of this tool.
  • Managing certificate files can be challenging for some developers, as losing or misplacing the certificate file can result in the inability to update or distribute an app.

JarSigner

jarsigner

JarSigner, included in the Java Development Kit (JDK), is a command-line tool used to sign Java Archive (JAR) files digitally. The purpose of this tool is to verify the authenticity and integrity of JAR files used for distributing Java applications and libraries.

To use jarsigner, a public-private key pair is generated using a tool such as key tool included with the JDK. The JAR file is then signed using Jar Signer, which generates a digital signature that can be verified using the public key.

Key Features of jarsigner

  • Generates digital signatures for JAR files using public key cryptography.
  • Verifies digital signatures using the signer’s public key.
  • Included in the Java Development Kit (JDK), making it a standard tool for Java developers.

Advantages of jarsigner

  • Enhances the security of Java applications by digitally signing JAR files.
  • Digital signatures generated by Jar Signer can be easily verified using the signer’s public key.
  • Standard tool included in the JDK, making it easy for developers to use without requiring additional tools or software.

Limitations of jarsigner

  • Can be complex for some developers to use.
  • Compatibility issues may arise when dealing with different platforms or systems.

SignPath

signpath

SignPath is a codesigning procedure that offers a secure, automated, and repeatable solution for signing code in the cloud and on-premises.

It provides various key features such as:

  • Integration with current continuous deployment (CD) pipelines using simple command line or API calls, eliminating the need to install cryptographic service providers (CSPs) or attach USB tokens.
  • Ease of managing certificates, defining strict policies, monitoring private key usage, and delegating responsibility for signing releases with this codesigning tool.
  • Unique solutions for open-source projects to establish a secure build chain for the end-user.

Despite its advantages, SignPath also has certain limitations, such as:

  • The cost of using SignPath can be higher compared to other codesigning tools in the market.
  • The reliance on SignPath’s cloud infrastructure for secure code signing can result in latency or downtime issues if the server goes down.

PrimeKey SignServer

primekey

PrimeKey SignServer is an open-source software solution that provides organizations with digital signature and public key infrastructure (PKI) services. It enables users to securely sign, verify, encrypt, and decrypt electronic documents and data and issue, manage, and revoke digital certificates.

Key Features of SignServer

  • Sign Server supports various digital signature formats, including PDF, XML, and OpenPGP signatures, making it highly versatile.
  • Sign Server is highly customizable and allows organizations to integrate it into their existing workflows and systems with ease.
  • Sign Server supports multiple use cases, including code signing, document signing, and email signing.

Advantages of SignServer

  • Sign Server provides organizations with a cost-effective solution for digital signature and PKI services.
  • Sign Server enables organizations to maintain control of their PKI infrastructure and avoid vendor lock-in.
  • Sign Server is highly scalable, allowing organizations to easily expand their infrastructure as needed.
  • Sign Server is open source, which provides transparency and the ability for users to modify and customize the software to their specific needs.

Limitations of SignServer

  • Implementation and configuration of Sign Server requires technical expertise and resources.
  • Customization and integration with existing workflows can be time-consuming and require significant development effort.
  • As an open-source solution, Sign Server may have less robust support and maintenance than commercial alternatives.

Apple Code Sign

apple

Apple Code Signing is a security technology that provides digital signatures for software on Apple platforms, including macOS, iOS, watchOS, and tvOS. This technology offers a range of benefits, including enhanced security, improved user experience, and developer accountability. Additionally, Apple Code Signing facilitates the distribution of software packages.

Key Features

  • Digitally signs software on Apple platforms, including macOS, iOS, watchOS, and tvOS.
  • Provides enhanced security.
  • Improves user experience.
  • Facilitates distribution.

Advantages

  • Helps ensure the authenticity and integrity of software.
  • Gives users greater confidence in downloading and using software.
  • Helps prevent malware and other security threats..
  • Enables easier distribution of software.

Limitations

  • Limited use of the Apple Code Signing tool, designed specifically for signing macOS and iOS app packages.
  • Cannot be used to sign other types of files, such as Android APKs or Docker images.

Docker Trust Sign

docker

Docker Trust Sign is a process that adds a digital signature to a Docker image by a trusted entity to ensure its authenticity and integrity. This establishes trust between the image publisher and consumer, with a unique cryptographic signature that guarantees the image has not been tampered with. The benefits of Docker Trust Sign include enhanced authenticity and security, compliance, and simplified deployment. However, this process has limitations, including its complexity, cost, and limited access. Additionally, managing keys and certificates for Docker Trust Sign can be a challenge.

Key Features

  • Signing Docker images ensures their authenticity and integrity, establishing trust between image publishers and consumers
  • Docker images are given a unique cryptographic signature that can be verified by anyone who downloads the image

Advantages

  • Improved authenticity and security of Docker images
  • Enables compliance with security policies and regulations
  • Simplifies deployment processes

Limitations

  • Can be complex to set up and manage
  • May involve additional costs, such as for obtaining and managing digital certificates
  • Access to Docker Trust Sign may be limited to certain users or organizations
  • Key management can present a challenge, particularly for large-scale deployments

APK Signer

APK

APK signer is a software tool designed to sign Android APK (Android Package) files using digital signatures. This process ensures that the file is authentic and has not been tampered with. Users can choose to self-sign APK files or obtain certificates from a certificate authority (CA) for added security.

While there are various tools available for signing APK files, including command-line tools and integrated development environments, APK signer is a popular choice due to its simple graphical interface and cross-platform compatibility.

Key Features

  • APK signer is a tool to sign Android APK files with digital signatures.
  • Different signing tools are available, such as the Android Studio IDE or command-line tools like the JDK’s jarsigner tool.
  • APK signer provides a simple graphical interface and can be used on any platform that supports Java.

Advantages

  • Authenticity: APK signer adds a digital signature to the APK file, which verifies its authenticity.
  • Integrity: The digital signature added by APK signer ensures that the APK file has not been tampered with or altered.
  • Security: Signing an APK file with APK signer enhances the security of the app.
  • Compatibility: APK signer can be used on any platform that supports Java, making it a widely accessible tool.

Limitations

  • Complexity: APK signing can be a complex process, and APK signer may require some technical knowledge to use.
  • KeyStore Management: Users must manage their KeyStore carefully to prevent misuse or unauthorized access.
  • Risk of being misused: Like any tool, APK signer could be misused if used by malicious individuals to sign and distribute malware or harmful apps.

These are just a few examples of tools for generating code signatures. The choice of tool will depend on the specific requirements of the code being signed and the target platform or ecosystem.

To learn more about Encryption Consulting’s Code Signing Tool, visit our CodeSigning Solution

Conclusion

To sum up, code signing plays a vital role in software security to safeguard it against tampering and malicious attacks. The code signing tools discussed in this article are some of the most trusted and widely-used solutions available today. They come with a range of key features and advantages, such as seamless integration with existing development processes, robust authentication and encryption, and flexible pricing plans. Selecting the most suitable code signing tool for your organization will depend on your specific needs and preferences.

Free Downloads

Datasheet of Code Signing Solution

Code signing is a process to confirm the authenticity and originality of digital information such as a piece of software code.

Download
secure and flexible code signing solution

About the Author

Nishiket Kumar is a Consultant at Encryption Consulting, working with PKIs, HSMs and working as a consultant with high-profile clients.

Read time: 6 minutes

Over the past two years, you’ve probably heard more than you ever wanted or expected to hear about supply chain attacks. According to a study, these attacks have seen approx. 650% year-over-year growth. The survey discovered that software development environments still have low levels of security. Additionally, every business analyzed had flaws and configuration errors that made them vulnerable to supply chain attacks.

What is Software Supply Chain Attacks?

When nefarious hackers penetrate third-party software dependencies utilized in numerous “downstream” applications, it results in a software supply chain attack. The common element is open-source software, frequently an automatically trusted source of code utilized by internal system developers. Attackers may potentially steal sensitive information from, disrupt services for, or breach networks at hundreds or even thousands of businesses by infiltrating a single open-source program or library.

Damage dealt

More recent research sheds light on the tendency that three out of five companies were subject to software supply chain attacks. In 2021, Only 38% of businesses claimed that they were unaffected by this attack. Not every attack is the same; some are big, while others are swiftly in the rearview mirror. Some of the High-profile Software attacks which took the internet off the storms were:

  • Solarwinds (Dec 2020)

    Threat actors used the Orion software as a weapon to access several government networks and thousands of private systems worldwide, making the SolarWinds supply chain attack a worldwide hack. The US departments of health, treasury, and state were noteworthy victims of this attack.

  • Codecov (April 2021)

    Attackers were able to insert a backdoor into Codecov to gain access to sensitive client data, which led to a recent large breach. Very skilled attackers used a flaw in how Codecov created Docker images to carry out this intrusion. They utilized this to alter a script that let them launch several attacks from a remote server using the environment variables from the CI of Codecov users.

  • Microsoft’s Winget (May 2021)

    WinGet’s software registry was inundated with pull requests for applications that were either duplicates or misbehaved the weekend after launch. It was inundated with faulty or duplicate packets, which overwrote the already present ones.

  • Kaseya (July 2021)

    Numerous managed security providers’ remote monitoring and management software platforms contained a zero-day vulnerability that a ransomware organization found and exploited. This incident encrypted the files of over 1,500 businesses.

  • Log4j Vulnerability (Dec 2021)

    The flaw enables attackers to obtain remote access to Log4j-using apps. The vulnerability is in the communication mechanism, allowing an attacker to insert malicious code into the logs and have it run on the system.

And many more on the list.

Top Attack vectors

Many distinct attack vectors are utilized to compromise a software provider and successfully attack through the development pipeline. Attackers mainly concentrated their attacks on these points:

  • Exploiting Open-Source applications flaws

    Most commercial software has open-source code. Two areas are the focus of vulnerable application supply chain assaults:

    • One is exploiting flaws in previously extensively installed and disseminated programs. E.g., Log4j vulnerability.
    • Including malicious code in well-known private and open-source packages to get automated pipeline tools to include them in the application build process. E.g., us-parser-js package poisoning.
  • Compromised Pipeline tools and altered the build process

    The second attack method is the compromise of pipeline tools, which enables attackers to alter or introduce malicious code. The source code of an application, which serves as its blueprint as well as the development infrastructure and procedures, can be made public by a compromised CI/CD pipeline.

    At the same time, the program is being built (as was the case of SolarWinds). Additionally, the pipeline is coupled with dozens of external dependencies that can be utilized to access and launch attacks, like the Codecov attack.

  • Manipulating the Code of Integrity

    Sensitive data in code, poor code quality, and security vulnerabilities were frequently observed in the environments of many of the customers. The submission of flawed code to source code repositories has been recognized as the third risk factor. This influences the security posture and artifact quality.

How can Codesigning help?

Code signing is a process to confirm the authenticity and originality of digital information, such as a piece of software code. It assures users that this digital information is valid and establishes the author’s legitimacy.

Code signing also ensures that this digital information has not changed or been revoked after it was validly signed. Code signing can assure double authentication, thwart attacks, and even avoid namespace conflicts as you share source code throughout the SDLC.

Best Practices

Here are a few code-signing best practices to guarantee the security of your application code.

  • Securing all the private keys

    The loss, theft, or compromise of a code-signing private key poses a serious security risk. There are some simple rules we can follow to avoid the risk:

    • Restricting unauthorized access to the keys.
    • Implementing physical security control over the keys to limit the process.
    • Securing keys with cryptographic hardware items.
  • Automating the signing process by Pipelines

    An end-to-end centralized approach to code signing procedures while enforcing security regulations is part of the automated code signing process. Without slowing down the SDLC, this automation approach connects with CI/CD pipelines and uses granular access control.

  • Describe the roles, responsibilities, and procedures for approval.
  • Integrating with existing environments and tools can make code signing quick and simple for the internal teams.
  • Using time stamps to record all codesigning activities.

Conclusion

Your software supply chain is intricate, extensive, and interrelated, making it vulnerable to attacks. There have been a few devastating and small attacks in the past, and the future could be much better. Attackers have been using different attack vectors to target a specific side. The application of code signing is a crucial security-hardening technique.

Code signing ensures no tampering from unapproved parties and that the final published software is from the original publisher. By following certain code signing best practices, we can ensure that the Supply Chain attacks no longer threaten us.

For more information, you can contact us info@encryptionconsulting.com

Free Downloads

Datasheet of Code Signing Solution

Code signing is a process to confirm the authenticity and originality of digital information such as a piece of software code.

Download
secure and flexible code signing solution

About the Author

Nishiket Kumar is a Consultant at Encryption Consulting, working with PKIs, HSMs and working as a consultant with high-profile clients.

Issue

Every time the user tries to enroll a certificate, an RPC Server Unavailable error appears. In this instance, the domain controller or another client neglects to sign up for certificates from the CA.

Error Code

0x800706ba (WIN32: 1722 RPC_S_SERVER_UNAVAILABLE)

ADCS Certification Authority

Description

When a user requests a certificate from ADCS Certification Authority, the certificate request cannot be submitted to the certification authority giving out an error

The RPC server is unavailable

Cause

This RPC Server unavailable error occurs only due to two reasons:

  • It is not feasible to connect to the CA’s RPC interface.
  • Although it is possible to connect to the CA’s RPC interface, authentication is not supported.

Steps done

  • Checked from network trace to find that it denies the access (status: nca_s_fault_access_denied)
  • Checked GP Result to see which GPO are being populated.

Solution

This solution has been divided into five parts, covering the details of what we need to do:

  1. Checking Network Connection

    The client and the CA must be able to communicate via the network.

    • Check whether the hostname for CA Server is correct or not.
    • If the hostname is correct, then look for whether the name resolution is working fine and resolving the server’s name (i.e., the DNS entry registered on the old computer object).
    • Check whether the correct ports are opened on all firewalls (if any).
    • Basic, but it should also be taken care that the CA server and service are available and running successfully.
  2. Fixing the RPC Interface

    Coming to CA, the first hurdle is that the RPC interface must be cleared, and the connection should be established. To do this, the account should have “Access this computer from the network” permissions granted.

    To do this

    • Open Local Security Policy -> Expand Local policies -> Double click User rights assignment.

      access the computer from the network
    • By default, the following accounts should be enrolled here. Everyone, Administrators, Backup operators, Users

      network properties

      Note: There is also an option to “Deny access to this computer from Network”, which should strictly be avoided.

  3. DCOM Permissions

    After RPC is properly configured, DCOM will handle the authentication. To open this configuration,

    • Open Component Services; to do so, type dccomcnfg.
    • Browse to My computers and right-click. Enter properties.

      dccomcnfg
    • Browse to COM Security under “EDIT LIMITS”.

      Browse to COM Security
    • Check whether these permissions are there in the security group:

      • Access permissions: Local Access and “Remote Access”
      • Launch and activation permissions: “Local Launch” and “Remote Launch.”

        Local Access and Remote Access
        Local Launch and Remote Launch
      • By default, the “Authenticated Users” are in the local “Certificate Service DCOM Access” security group.

      Note: To be aware that these settings can be controlled via Group Policy.

  4. DCOM Config (CertSrv) Interface

    • Go to “Component Services” -> “Computers” -> “My Computers” -> “DCOM Config”
    • Open DCOM Config and select CertSrv Request. Right click and open properties.

      CertSrv Request
    • Go to security tab and click on edit.

      CertSrv Interface
    • Set the following permissions:

    • For Launch and Activation Permissions: Check “Local Activation” and “Remote Activation” for Everyone
    • For Access Permissions: Check “Local Access” and “Remote Access” for Everyone

      Access Permissions
      CA Permissions
  5. CA Permissions

    It is always a checklist to see that the proper permissions on the CA are given. Otherwise, it would return CERTSRV_E_ENROLL_DENIED error.

If you need help with your PKI environment, feel free to email us at info@encryptionconsulting.com.

Free Downloads

Datasheet of Public Key Infrastructure

We have years of experience in consulting, designing, implementing & migrating PKI solutions for enterprises across the country.

Download
Implementing & migrating PKI solutions for enterprises

About the Author

Nishiket Kumar is a Consultant at Encryption Consulting, working with PKIs, HSMs and working as a consultant with high-profile clients.

Read time: 7 minutes

All the domain names and IP addresses protected by the certificate are listed systematically using the SAN or Subject Alternative Name. The Subject Alternate Names must be provided on an SSL/TLS certificate when further website actions need to be secured so that the DNS server can map the IP address to the domain name.

The SANs information can be found in the SSL/TLS certificate data by clicking on the padlock icon in most web browsers’ address bars.

In this blog, we will talk about how to add Subject Alternate Name attributes to a certificate, i.e., Web Server Certificate Enrollment with SAN Extension. Also, we will cover an error, i.e., Adding SAN (Subject Alternative Name) into the Additional attributes field on the Microsoft CA Certificate request form doesn’t produce does not automatically produce a certificate with a “Subject Alternative Name” entry.

Web Server Certificate Enrollment with SAN Extension

Enrolling a certificate with a custom SAN extension is now super simple. There is a certain set of instructions to follow, and you’ll get it.

Setting Certificate Template

Most certificate templates are set up to build a subject from Active Directory. But in the case of SSL Certificates, they use Supply in the request because they use a custom subject name. If you are using the default web server template, then there is no need to modify anything. For the custom certificate template, you should update it as given below.

Enrolling a certificate with a custom SAN extension

Also, you need to give Read and Enroll permissions from the security tab to your account.

Setting Certification Authority

Setting Certification Authority

  • Go to the certsrv console and expand Issuing CA.
  • Go to Certificate Template and open it.
  • Check whether the template is listed in the window; if not, right-click on the certificate template and then New -> Certificate Template to issue.
  • Select the required template and click on add.
certsrv console and expand Issuing CA

Certificate Enrollment Process

  • Open mmc console. In the Console1 window, go to File-> Add/Remove Snap-in.

    mmc console
  • In the Add/Remove Snap-in dialog box, click on certificates and add.

    Add/Remove Snap-in dialog box
  • In certificates, snap in box, click computer account, and next.

  • In the select computer window, click Local Computer and Finish.

    certificates-snap-in-box
  • Click Ok and close the snap-in.

  • Right-click on the personal node. Click on All tasks-> Request new certificate.

    Subject Alternative Name Certificates
  • In the Before you begin page, click Next.

  • In the select enrollment policy page, select the appropriate policy and go next.

    Subject Alternative Name - Certificate Enrollment Policy
  • In the Request Certificate box, click on the required template, expand its details, and open its properties to configure it.

    Subject Alternative Name - Request Certificate box
  • Certificate Properties Dialog box will appear like this.

    Subject Alternate Name  - •	Certificate Properties Dialog box
  • Since you are using Subject Alternate Name (SAN), you can leave the Subject name empty. In the dropdown, select the proper type for SAN. (In the case of SSL certificates, DNS is common).

  • In the value box, enter the names in the corresponding format and click add. Repeat this step for all the values you want to add.

    certificate enrollment page
  • Hit Ok and close. You’ll return to the certificate enrollment page. Click on enroll.

    certificate enrollment page - request certificates
  • Click finish when the certificate is successfully installed.

    Subject Alternative Name - certificate installation results
  • Here, you can view the Certificate’s SAN details.

    Certificate Subject Alternative Name details

Troubleshooting

Issue

The certificate generated doesn’t include SAN (Subject Alternative Name) entry even after adding SAN in the additional attributes field.

Cause

If Microsoft CA’s issuance policy is not set up to accept the Subject Alternative Name(s) attribute via the CA Web enrollment page, executing the preceding steps could not result in a certificate that includes a SAN entry.

Solution

To solve this, we need to run this command through the administrative command prompt:

certutil -setreg policy\EditFlags +EDITF_ATTRIBUTESUBJECTALTNAME2

CA's web enrollment page

After running this command, make sure to restart the ADCS Services by running

net stop certsvc and net start certsvc

Now, you can create the certificate with the SAN entry by using the CA’s web enrollment page.

Microsoft CA's issuance policy

If you need help with your PKI environment, feel free to email us at info@encryptionconsulting.com

Conclusion

All the domain names and IP addresses protected by the certificate are organized into a SAN or subject alternative name. You can easily add SAN entries to the certificates by following the certain instructions depicted in this blog. There is an issue when the certificate generated comes out without a SAN entry, even after adding a SAN entry. This can be solved by running a single command which adds the entry, and now you can create the certificate.

Free Downloads

Datasheet of Public Key Infrastructure

We have years of experience in consulting, designing, implementing & migrating PKI solutions for enterprises across the country.

Download
Implementing & migrating PKI solutions for enterprises

About the Author

Nishiket Kumar is a Consultant at Encryption Consulting, working with PKIs, HSMs and working as a consultant with high-profile clients.

PKI

How to disable Delta CRL

Read time: 4 minutes

What is a CRL and Delta CRL?

A list of digital certificates that have had their issuing certificate authority (CA) revoke them before their actual or assigned expiration date is known as a certificate revocation list (CRL).

A Delta CRL is a supplemental CRL that is optional and only includes the updates made since the last Base CRL update. The standard CRL we’ve been discussing is called “Base” about a delta CRL if one is present.

Steps to Disable Delta CRL

Delta CRL can be disabled either by running certain commands on an administrative command prompt or by using GUI, which is discussed below:

By Command Prompt:

  • Set Delta CRL Validity to zero by running this command on an administrative command prompt: Certutil -setreg CA\CRLDeltaPeriodUnits 0

    Delta CRL Validity
  • Run net stop certsvc and net start certsvc to restart the ADCS Service.

    certsvc
  • Run certutil -crl to publish new CRLs.

    certutil-crl

By using GUI:

  • Open Certificate Authority (CA) Console. To do so, open Server Manager -> Tools -> Certification Authority.

    Certification Authority
  • Right-click on Revoked Certificates and open properties.

    Revoked Certificates properties
  • On the properties page, uncheck “Publish Delta CRLs.”

    To publish Delta and new CRLs
  • Click on Apply and OK.
  • To Publish new CRLs, Right click on Revoked Certificates -> All tasks -> Publish.

    Publish CRLS
  • Click on New CRL to publish.

    Published Certificate Revocation List (CRL)

If you need help with your PKI environment, feel free to email us at info@encryptionconsulting.com.

Free Downloads

Datasheet of Public Key Infrastructure

We have years of experience in consulting, designing, implementing & migrating PKI solutions for enterprises across the country.

Download
Implementing & migrating PKI solutions for enterprises

About the Author

Nishiket Kumar is a Consultant at Encryption Consulting, working with PKIs, HSMs and working as a consultant with high-profile clients.

Read Time: 3 minutes

In this blog, we are covering an error where the ADCS Service stopped working on Issuing CA. The issue was related to the HSM side as the SafeNet Key Storage provider failed to initialize properly.

Issue

ADCS Service failing to start.

Error Code

Log Name Application
Source Microsoft-Windows-CertificationAuthority
Event ID 100
Level Error

Description

Active Directory Certificate Services did not start: Could not load or verify the current CA certificate. Issuing CA Provider DLL failed to initialize correctly. 0x8009001d (-2146893795 NTE_PROVIDER_DLL_FAIL).

This error comes in the case of Luna; if it’s Ncipher, you’ll see that the provider of the Ncipher will fail.

Steps done

  • We did run certutil -csplist to check whether the SafeNet Key Storage Provider was configured correctly.
  • If there is a provider failed to pass the test. You can check the configuration under the registry entries under
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration \CA NAME\CSP

Solution

This issue often occurs when CA uses the HSM and HSM is incorrectly configured.

  • Verify that the connectivity of HSM is properly configured.
  • HSM’s cryptographic service provider should be loaded/initialized properly (re-register and reconfiguring along with a reboot).

Free Downloads

Datasheet of Encryption Consulting Services

Encryption Consulting is a customer focused cybersecurity firm that provides a multitude of services in all aspects of encryption for our clients.

Download
Encryption Services

About the Author

Nishiket Kumar is a Consultant at Encryption Consulting, working with PKIs, HSMs and working as a consultant with high-profile clients.

Read Time: 5 minutes

This blog discusses Cross Forest Certificate Enrollment and the steps required to do it.

What is Cross Forest Certificate Enrollment?

  • Enterprises can build a central PKI in one Active Directory Domain Services (AD DS) forest that issues certificates to domain members in other forests by using cross-forest enrolment.
  • By combining certificate templates from many forests into a single PKI that supports all forests, enterprises with current per-forest AD CS implementations can lower the number of CAs.
  • To offer enrollment services across all forests, enterprises with multi-forest settings but no PKI can implement AD CS in a single forest.

Prerequisites

  • Two-way forest trusts exist between account and resource forests.
  • One or more enterprise CAs running on Windows Server.

Steps

Publish the Root CA Information to another Forest.

  1. Log on to a domain controller in the Forest as a member of the Enterprise Admins group.
  2. Insert the USB thumb drive containing the root CA published certificate and CRL.
  3. Ensure you are in the administrative command prompt.
  4. At the command prompt, type “certutil -f -dspublish ” Root CA.crt” RootCA
  5. At the command prompt, type PKIView.msc and press ENTER.
  6. If the pkiview message box appears, click OK to accept the error message if prompted.
  7. In the console tree, right-click Enterprise PKI, and then click Manage AD Containers.
  8. On the Certification Authorities Container tab, ensure that RootCAName appears.
  9. On the AIA Container tab, ensure that RootCAName appears. Click OK.

Publish SubCA information to new Forest Configuration Partition (Enrollment Services and Templates)

  1. Ensure New Forest has Permissions/Delegations configured on CN=Public Key Services, CN=Services, CN=Configuration, DC={forest root domain}
  2. From existing forests, modify the scheduled task to update PKIsync.cmd to new Forest (Below additional line to be added)
    .\PKISync.ps1 -sourceForest RESOURCE.LOCAL -targetforest account.LOCAL -type Template -cn ” <certificate template common name>. ” >> C:\Temp\CAScripts\PKSyncCorp.txt
  3. Run the Scheduled task “PKI Cross Forest Replication”
  4. Login to target forest open ADSIEDIT.msc > Connect to configuration partition N=Public Key Services, CN=Services, CN=Configuration, DC={forest root domain}
  5. Check Enrollment Services > Verify if PKI Servers exist there.
  6. Check Certificate Templates > Verify customer certificate templates exist there

Note: Above cmd only syncs specific templates; you may choose to sync entire containers.

Publish the SubCA Information to a New Forest. 

  1. Open an administrative command prompt.
  2. At the command prompt, type USB: and then press ENTER.
  3. At the command prompt, type CD \CACerts and press ENTER.
  4. At the command prompt, type certutil -dspublish -f <enterprise-ca-cert-filename.cer> SubCA and then press ENTER.
  5. At the command prompt, type certutil -dspublish -f <enterprise-ca-cert-filename.cer> NTAUthCA and then press ENTER.

Add SubCA Information to the Cert Publishers group in New Forest. 

  1. Open Active Directory Users and Computers.
  2. Connect to the Domain needed
  3. In the console tree, navigate to the CN=Users container.

Note: If the group is not in the default container, search for it within the domain.

  • In the details pane, double-click Cert Publishers.
  • On the General tab, ensure that the group’s scope is Domain Local.
  • Add PKI Servers from the forest as members.

Assign permissions of Forest to Certificate Templates

  1. Open Active Directory certificate authority.
  2. Find Certificate templates > Right Click > Manage
  3. Find the Certificate Templates and go to their properties
  4. Assign users/groups/computers
  5. On the General tab, ensure that the group’s scope is Domain Local.
  6. Add PKI Servers from the forest as members.

Assign permissions on CA so new Forest can enroll Certificates

  1. Open Active Directory certificate authority.
  2. Right Click CA Name > Choose Properties
  3. Navigate to Security > Add Groups of New Forest, which needs to enroll.

References

https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-r2-and-2008/ff955842(v=ws.10)

If you need help with your PKI environment, feel free to email us at info@encryptionconsulting.com.

Free Downloads

Datasheet of Public Key Infrastructure

We have years of experience in consulting, designing, implementing & migrating PKI solutions for enterprises across the country.

Download
Implementing & migrating PKI solutions for enterprises

About the Author

Nishiket Kumar is a Consultant at Encryption Consulting, working with PKIs, HSMs and working as a consultant with high-profile clients.

PKI

SafeNet KSP: Provider DLL failed

Read Time: 5 minutes

In this blog, we will cover a common error while Installing Active Directory Certificate Services. While configuring the setup on Server Manager, the option for SafeNet Luna Cryptographic Key Provider wasn’t available.

Issue

CA Service wasn’t working.

Error Code

Provider Name: SafeNet Key Storage Provider
SafeNet Key Storage Provider: Provider DLL failed to initialize correctly.
CertUtil: -csplist command FAILED: 0x80090030 (-2146893776 NTE_DEVICE_NOT_READY)
CertUtil: The device that is required by this cryptographic provider is not ready for use.

Description

We weren’t getting an option for SafeNet Luna Cryptographic Key Provider while configuring ADCS for Issuing CA despite installing KSPConfig and successfully completing all the HSM setups.

Steps done

  • We did run certutil -csplist to check whether the SafeNet Key Storage Provider was configured correctly.
  • Checked the vtl verify is working.
  • Tried to re-install the KSP configuration again.
  • We ran Regedit to check whether the options for SafeNet are available in the Registry

Solution

This comes out to be a generic error with SafeNet HSM Configuration. To solve it, we did is to re-configure the HSM by Re-registering the account and rebooting the system. It did solve the issue in this case.

Configuring the KSP Using the GUI

You can use the KspConfig utility to configure the KSP with your partitions. The Crypto Officer must complete this procedure using Administrator privileges on the client.

You can register the following user/domain combinations with the KSP:

  • Administrator user with the domain-specific to the client. Default Windows domains are in the format WIN-XXXXXXXXXXX.
  • SYSTEM user with the NT-AUTHORITY domain

The configuration tool registers a Crypto Officer password/challenge to a specific user so only that user can unlock the partition.

Steps to configure the KSP using the GUI

1. In Windows Explorer, navigate to the Luna KSP install directory and launch KspConfig as the Administrator user.

2. In the left panel, double-click Register or View Security Library. Enter the filepath to cryptoki.dll or click Browse to locate it.

<client_install_dir>\cryptoki.dll

Click Register to complete the registration.

3. In the left panel, double-click Register HSM Slots. Select the Administrator user, client domain, and an available slot to register. Enter the CO password/challenge and click Register Slot.

4. Select the SYSTEM user and NT-AUTHORITY domain and register for the slot.

5. Repeat steps 3-4 for any other available slots you want to register with the KSP.

(One common mistake is to just reconfigure it without rebooting the system).

References

https://thalesdocs.com/gphsm/luna/7/docs/network/Content/sdk/microsoft/ksp_cng.htm

If you need help with your PKI environment, feel free to email us at info@encryptionconsulting.com.

Free Downloads

Datasheet of Public Key Infrastructure

We have years of experience in consulting, designing, implementing & migrating PKI solutions for enterprises across the country.

Download
Implementing & migrating PKI solutions for enterprises

About the Author

Nishiket Kumar is a Consultant at Encryption Consulting, working with PKIs, HSMs and working as a consultant with high-profile clients.

Read time: 2 minutes 

This blog will discuss a known bug happening with the Luna HSM Client version, preventing users from installing NDES. 

Source: Microsoft-Windows-Certification Authority

Error Code: 0x6cc (WIN32: 1740 RPC_S_DUPLICATE_ENDPOINT).

Event ID: 34

Description

On Server 2016 while building the PKI, even though with all the CA’s built/configured, OSCP deployed successfully, still the command to restart the services via scripts cannot be issued.  

After running through the scripts to configure the CA using various certutil commands the script gets to  

net stop certsvc && net start certsvc

What the screen displays:

The Active Directory Certificate Services service is stopping. 
The Active Directory Certificate Services service was stopped successfully. 

The Active Directory Certificate Services service is starting. 
The Active Directory Certificate Services service was started successfully. 

When trying to restart the services, it reports:

WIN32: 1749 RPC_S_DUPLICATE_ENDPOINT

Active Directory Certificate Services did not start, could not initialize RPC for Issuing CA, and showed the endpoint as duplicates.  

As the setup times out and the installation fails, it reports either RPC is unavailable or that the endpoint text is duplicate. This behavior is consistent across all CAs on the server and prevents from installing NDES.

Cause

The duplicate endpoint error message is caused by the SafeNet KSP library’s failure to release the service before it is restarted. It was an issue with Luna Version 10.3.0, where the service restart was too fast, and it locked the KSP. 

Solution

Since it is an issue with the Luna Client version, so upgrading the client version will solve the issue. In this case, 10.3.0 was there, and upgrading to 10.5.0 solved the issue. 

 

If you need help with your PKI environment, feel free to email us at info@encryptionconsulting.com.

Free Downloads

Datasheet of Public Key Infrastructure

We have years of experience in consulting, designing, implementing & migrating PKI solutions for enterprises across the country.

Download
Implementing & migrating PKI solutions for enterprises

About the Author

Nishiket Kumar is a Consultant at Encryption Consulting, working with PKIs, HSMs and working as a consultant with high-profile clients.

Hardware Security Module

HSM as a Service (HSMaaS)

Read time: 7 Minutes

Organizations need to secure keys and secrets, and their data is increasing exponentially. The demand for high-level security for that is at its peak now. For most organizations, automation of key lifecycle management is ideal because the lifecycle of cryptographic keys also calls for a high level of management. HSMs, or hardware security modules, are the mainstay in this scenario. Hardware security module (HSM) adds additional security for sensitive data. Before diving into HSM as a Service, let’s briefly discuss what HSM is and how it works.

What is HSM, and how does it work?

Hardware security modules (HSMs) are fortified, tamper-resistant hardware components that produce, safeguard, and manage keys for encrypting and decrypting data and establishing digital signatures and certificates. This secures cryptographic procedures. To the highest security requirements, including FIPS 140-2 and Common Criteria, HSMs have been evaluated, verified, and certified. HSMs are extremely difficult to breach and have highly regulated access, which is one of the reasons they are so secure.

For constructing tamper-resistant, hardened environments for storing cryptographic keys, HSMs act as trust anchors. An HSM can serve as the ideal Root of Trust in any organization’s security infrastructure thanks to the stringent security procedures implemented inside it. They have the specialized gear to generate high-quality random keys. Multiple organizations use more than one HSM to secure their environment instead of just one. A simplified, central key management system founded on stringent internal security standards and external laws enhances security and compliance regardless of how many HSMs are deployed.

To further protect against breaches, HSMs are often kept off the organization’s computer network. An attacker would need physical access to the HSM to view the protected data.

HSM as a Service

A top priority is creating an encryption key management and maintenance plan, especially if you want to keep your HSMs operating at peak efficiency throughout each encryption certificate. To fully actualize secure techniques for data security, this includes managing your encryption keys over private and public networks and hybrid mixes of physical and cloud-based HSM functions. It would help if you established uniformity around the board to successfully navigate the difficulties of switching to HSM as a Service.

EC’s HSM as a Service

The HSM as a Service from Encryption Consulting offers the highest level of security for certificate management, data encryption, fraud protection, and financial and general-purpose encryption. It is globally compatible, FIPS 140-2 Level 3, and PCI HSM approved. It offers customizable, high-assurance HSM Solutions (On-prem and Cloud) designed and built to the highest standards. We are Vendor- agnostic and provide various options, whichever is best for you to deploy. We ensure Highest Availability around the world and supply our services across the globe. 

Encryption Consulting’s HSM-as-a-Services are suitable for the following:

  • Customers who already have HSM deployed in place.
  • Customers who are planning for new HSM infrastructure (Designing and Deploying)

Being a Vendor-agnostic Organization, we give it upon the customer to implement whichever HSM they want by providing various options:

  1. Entrust N-shield HSM

    nShield HSMs provide a secure solution for encryption and signing keys, creating digital signatures, encrypting data, and more. N-shield as a Service gives the advantages of a cloud service deployment with the same features and capability as on-premises HSMs.

  2. Thales Luna 7 HSM

    Thales Luna Network HSMs secure your sensitive data and critical applications by storing, protecting, and managing your cryptographic keys with high-assurance, tamper-resistant, network-attached appliances offering market-leading performance.

  3. FutureX HSM

    FutureX hardware security module solutions provide robust encryption, tamper resistance, and logical security to safeguard your most sensitive data. Key lifecycle management, payment encryption, and general encryption are all handled by Futurex HSMs.

For HSM, we provide both varieties of solutions:

Dedicated HSM

Azure Dedicated HSM offers storage for cryptographic keys. Dedicated HSM meets the most demanding security requirements.

  • Organizations who require FIPS 140-2 Level 3-validated devices and total and exclusive control over the HSM appliance should choose this option.
  • Microsoft uses Thales Luna 7 HSM model A790 appliances to supply the Dedicated HSM service.
  • They are directly deployed to a client’s private IP address space.
  • Single-tenant devices.
  • Full administrative control and High Performance.
  • Azure Dedicated HSM is most suitably used in migration scenarios.

Managed HSM

Azure Managed HSM is a fully managed, highly available, standards-compliant cloud service that enables you to safeguard cryptographic keys for your cloud applications.

  • Uses FIPS 140-2 Level 3 validated devices.
  • Your keys are safeguarded using Marvell LiquidSecurity HSM adapters while using Managed HSMs.
  • Single-tenant devices.
  • Supports Import keys from your on-premises HSMs.

Advantages of HSM as a Service

  • Systems that are exceptionally safe against tampering include tamper-evident, tamper-proof, and tamper-resistant systems.
  • Can implement on both On-premises and Cloud with scalability and versatility.
  • Maintain complete control over key materials regardless of where application workloads occur.
  • Leveraging numerous clouds to expand cloud-based cryptography and key management.
  • With a single click, services may be automatically scaled, reducing the administration burden.
  • When necessary, enables the creation and application of rules to ensure compliance

EC Managed HSMaaS

Encryption Consulting LLC (EC) will completely offload the HSM environment, which means EC will take care of deploying the HSM environment to lead and manage the HSM environment (cloud/ hybrid or On-Prem) of your organization. For more information, visit our website or contact us via email.

Conclusion

Hardware Security Module (HSM) is a specialized, highly trusted physical device used for all the main cryptographic activities, such as encryption, decryption, authentication, key management, key exchange, and more. EC’s HSMaaS provides a variety of options for HSM deployment as well as management. Dedicated HSM is used widely in migration scenarios, whereas Managed HSM supports importing keys from your on-prem HSMs. Advantages include security, scalability, versatility, full control, and more. Do visit our website or contact us for more information.

Free Downloads

Datasheet of Encryption Consulting Services

Encryption Consulting is a customer focused cybersecurity firm that provides a multitude of services in all aspects of encryption for our clients.

Download
Encryption Services

About the Author

Nishiket Kumar is a Consultant at Encryption Consulting, working with PKIs, HSMs and working as a consultant with high-profile clients.

Let's talk