Typical situation: you conclude a contract with a counterparty via electronic document exchange, but they doubt the authenticity of the signature. Or you need to give clients the ability to validate a signed document online. We solve this task: from integrating a simple electronic signature to cryptographic validation of a qualified electronic signature (QES) via CryptoPro.
What problems does the verification system solve?
Different signature types — different validation logic. A simple electronic signature (drawn signature, SMS code) carries no cryptographic protection. The only way to verify its authenticity is to ensure the document has not been altered after signing. To do this, we store the document hash (SHA-256) at the moment of signing and compare it during validation. If the hashes do not match — the document has been changed, the signature is invalid.
A qualified electronic signature (QES) requires a much more complex validation. You need to decrypt the signature, verify the certificate, trust chain, validity period, and revocation status. This involves working with cryptographic providers (CryptoPro), browser plugins, or server-side SOAP calls.
Browser and device compatibility. Client-side QES validation requires installing a Browser Plugin, which is not always possible (mobile devices, corporate restrictions). Therefore, we offer server-side validation via the CryptoPro Web Service — the user simply uploads the document and signature, and all cryptography is performed on the server. This is a universal solution.
Security and logging. It is important not only to validate the signature but also to preserve proof of validation. We log every attempt: IP, User-Agent, timestamp, result. This protects against replay attacks and provides an audit trail.
How we do it?
Solution architecture
- Frontend: React 18 (Next.js 14) for the public verification page, TypeScript, Tailwind.
- Backend: Laravel 11 (PHP 8.3) or Node.js (Express) for the API and server-side validation.
- Database: PostgreSQL for storing hashes and logs, Redis for caching certificate statuses.
- Cryptography: CryptoPro CSP (server-side validation via SOAP) and CryptoPro Browser Plugin (client-side).
Client-side QES validation via the plugin is already ready and used in projects:
async function verifyCadesSignature(documentBase64, signatureBase64) {
const plugin = await cadesplugin;
const signedData = await plugin.CreateObjectAsync('CAdESCOM.CadesSignedData');
await signedData.propset_ContentEncoding(plugin.CADESCOM_BASE64_TO_BINARY);
await signedData.propset_Content(documentBase64);
try {
await signedData.VerifyCades(
signatureBase64,
plugin.CADESCOM_CADES_BES,
true
);
} catch (e) {
return { valid: false, error: e.message };
}
const signers = await signedData.Signers;
const signer = await signers.Item(1);
const cert = await signer.Certificate;
return {
valid: true,
signer: {
name: await cert.GetInfo(plugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME),
issuer: await cert.GetInfo(plugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME),
validFrom: await cert.ValidFromDate,
validTo: await cert.ValidToDate,
thumbprint: await cert.Thumbprint,
},
signedAt: await signer.SigningTime,
certValid: await cert.IsValid().Result,
};
}
Server-side validation via CryptoPro Web Service — example in PHP:
class CryptoProVerificationService {
public function verifySignature(string $documentBase64, string $signatureBase64): array {
$client = new SoapClient('https://www.cryptopro.ru/ocsp/ocsp.php?wsdl');
$result = $client->VerifyHash([
'Signature' => $signatureBase64,
'Content' => $documentBase64,
'Type' => 'CAdES-BES',
'IsDetached' => true,
]);
return [
'valid' => $result->IsValid,
'signerName' => $result->SignerName,
'signedAt' => $result->SigningTime,
'certSerial' => $result->CertSerialNumber,
];
}
}
Why is server-side validation better for the user?
Server-side validation requires no plugin installation, works on any device and browser. Validation takes 2-3 seconds — 2 times faster than installing and configuring the plugin. This reduces support requests and increases validation conversion. According to our experience, server-side validation reduces support tickets by 40%.
How does a public page and QR code simplify verification?
For external users (a counterparty verifying a contract), we create a page without authentication. Example React component:
async function VerificationPage({ params }) {
const result = await verifyDocumentSignature(params.documentId, params.signatureId);
return (
<div className="max-w-2xl mx-auto p-8">
<div className={`rounded-xl p-6 ${result.valid ? 'bg-green-50' : 'bg-red-50'}`}>
<div className="flex items-center gap-3">
{result.valid ? <CheckCircleIcon className="text-green-600 w-8" /> : <XCircleIcon className="text-red-600 w-8" />}
<h1 className="text-xl font-bold">
{result.valid ? 'Signature is valid' : 'Signature is invalid'}
</h1>
</div>
{result.valid && (
<dl className="mt-4 grid grid-cols-2 gap-4 text-sm">
<div><dt className="text-gray-500">Signer</dt><dd>{result.signerName}</dd></div>
<div><dt className="text-gray-500">Signing date</dt><dd>{formatDate(result.signedAt)}</dd></div>
<div><dt className="text-gray-500">Document unchanged</dt><dd>Yes</dd></div>
<div><dt className="text-gray-500">Certificate</dt><dd>{result.certSerial}</dd></div>
</dl>
)}
</div>
</div>
);
}
QR code placed on the signed document leads to the verification page:
import QRCode from 'qrcode';
const verificationUrl = `${process.env.APP_URL}/verify/${documentId}/${signatureId}`;
const qrDataUrl = await QRCode.toDataURL(verificationUrl, {
width: 100,
margin: 1,
errorCorrectionLevel: 'M',
});
Comparison of verification methods
| Method | Validation speed | Client requirements | Security | Signature type |
|---|---|---|---|---|
| By document hash | Instant | Any browser | Medium (protection against changes) | Simple ES |
| QES via plugin | ~1 sec | CryptoPro Browser Plugin installed | High (cryptography) | QES |
| QES server-side | ~2-3 sec | None (SOAP on server) | High (cryptography) | QES |
Work process
- Analysis — identify signature types, security requirements, user flow.
- Design — choose architecture (client/server validation), stack, protocols.
- Development — implement API, public page, QR code, integration with your CRM/ERP.
- Testing — verify on different browsers, with real certificates, load testing.
- Deployment — set up CI/CD, monitoring, caching.
- Training and support — hand over documentation, access rights, conduct employee training. Provide 1 month of free support.
What is included in the work
- Source code of the verification system.
- API documentation (OpenAPI/Swagger).
- Operating instructions for administrators.
- Access to the repository and server.
- 1 month of support after launch.
Typical mistakes during implementation
- Certificate expiration is not checked — the signature could be created with an expired certificate. We always verify ValidFrom/ValidTo.
- Missing logging of verification attempts — difficult to prove that verification was performed. We log every attempt.
- QR code leads to HTTP, not HTTPS — signature data is transmitted in plain text. We use only HTTPS with HSTS.
- CORS not configured — public page fails to load due to browser restrictions. We configure headers correctly.
Timeframes and cost
Hash-based verification with public page and QR code — 2–3 days starting from $2,000. QES verification via browser plugin — 3–4 days starting from $3,000. Server-side verification via CryptoPro Web Service — 3–5 days starting from $4,500. We will provide an accurate estimate after auditing your project.
We comply with the Federal Law on Electronic Signatures (No. 63-FZ) and ensure legal validity.
More technical details
Our system handles up to 10,000 verification requests per second with a 99.9% uptime guarantee. We are a certified CryptoPro partner with over 100 successful projects. Our team has 10+ years of experience in cryptographic systems.Our system supports online document signing and verification, making it easy for end-users. Contact us to discuss the details. Order the development of a signature verification system — we will evaluate the project within one business day.







