You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document describes the relying party service interface protocol of Smart-ID server and
4
+
provides information for integration. The interface offers the entry point to Smart-ID main use
5
+
cases, i.e. authentication and signing.
6
+
7
+
The interface is to be used by relaying parties - parties who wish to use Smart-ID services,
8
+
i.e. ask end users to perform authentication and signing operations.
9
+
10
+
## 1.1 Glossary
11
+
12
+
* Smart-ID account - A person has to register a Smart-ID account to use services provided by the Smart-ID
13
+
system. Account binds a Smart-ID app instance (installed on a person's mobile device)
14
+
to a person's identity in the Smart-ID system. In the course of account creation and
15
+
registration, the identity of the account owner (person) is proofed by a Registration
16
+
Authority (RA) and the relation between the identity and a key pair is certified by a
17
+
Certificate Authority (CA). An account has a signature key pair and an authentication
18
+
key pair.
19
+
* Smart-ID app - A technical component of the Smart-ID system. A mobile app instance installed on a
20
+
person's mobile device that provides access to Smart-ID functionality for persons.
21
+
* Smart-ID provider - An organization that is legally responsible for the Smart-ID system.
22
+
* Smart-ID server - A technical component of the Smart-ID system. Server-side counterpart of the Smart-ID
23
+
app. Handles backend operations and provides API-s to Relying Party (RP).
24
+
* Smart-ID system - A technical and organizational environment, which enables digital authentication and
25
+
issuing of digital signatures of persons in an electronic environment. The Smart-ID
26
+
system provides services that allow persons (Smart-ID account owners) to authenticate
27
+
themselves to RPs, to give digital signatures requested by RPs, and to manage their
28
+
Smart-ID accounts.
29
+
* Authentication key pair (or authentication key) - Key pair, which is used to digitally authenticate a person.
30
+
* Certificate Authority (CA) - An entity that issues certificates for Smart-ID account owners.
31
+
* Key pair - Pair of keys, which are required for digital signature scheme. There are two kinds of key
32
+
pairs (or shortly, keys) in the Smart-ID system, authentication key pair and signature key
33
+
pair. The word pair refers to to the private and public keys of each key pair used in an
34
+
assymetric cryptographic algorithm, here RSA.
35
+
* Mobile device - A tablet computer or smartphone that runs a mobile device operating system (Apple iOS,
36
+
Google Android).
37
+
* Person - A natural person who uses the Smart-ID system to authenticate herself to an RP and to
38
+
issue digital signatures requested by RP.
39
+
* Registration Authority (RA) - An entity responsible for recording or verifying some or all of the information (particularly
40
+
the identities of subjects) needed by a CA to issue certificates and CRLs and to perform
41
+
other certificate management functions.
42
+
* Relying Party (RP) - An organization or service, for example a bank, which is using the Smart-ID service to
43
+
authenticate its users and to get them to sign the documents.
44
+
* Relying Party request - A request from an RP that requires some kind of operation in the Smart-ID backend
45
+
system. It may or may not create a transaction.
46
+
* Signature key pair (or signature key) - Key pair, which is used to give digital signatures of a person.
47
+
48
+
49
+
## 1.2. References
50
+
51
+
***ETSI319412-1** ETSI. Electronic Signatures and Infrastructures (ESI); Certificate Profiles;
52
+
Part 1: Overview and common data structures. 2015. URL: <http://www.etsi.org/deliver/etsi_en/319400_319499/31941201/01.01.00_30/en_31941201v010100v.pdf>.
53
+
***rfc2616** R. Fielding et al. Hypertext Transfer Protocol – HTTP/1.1. RFC 2616 (Draft Standard).
54
+
Obsoleted by RFCs 7230, 7231, 7232, 7233, 7234, 7235, updated by RFCs 2817, 5785,
55
+
6266, 6585. Internet Engineering Task Force, June 1999. URL: <https://tools.ietf.org/html/rfc2616>.
56
+
***rfc4122** P. Leach, M. Mealling, and R. Salz. A Universally Unique IDentifier (UUID) URN
57
+
Namespace. RFC 4122 (Standards Track). Internet Engineering Task Force, July 2005.
58
+
URL: <https://tools.ietf.org/html/rfc4122>.
59
+
***rfc4648** S. Josefsson. The Base16, Base32, and Base64 Data Encodings. RFC 4648
60
+
(Proposed Standard). Internet Engineering Task Force, Oct. 2006. URL: <https://tools.ietf.org/html/rfc4648>.
The RP must compute a verification code for each authentication and siging request, so the user can bind together the session on the browser or RP app and the authentication request on the Smart-ID app. The VC is computed as follows:
5
+
#### 2.3.13.2 Computing the verification code
6
+
7
+
The RP must compute a verification code for each authentication and siging request, so the
8
+
user can bind together the session on the browser or RP app and the authentication request
9
+
on the Smart-ID app. The VC is computed as follows:
7
10
8
11
`integer(SHA256(hash)[-2:-1]) mod 10000`
9
12
10
-
Calculate SHA256 from the hash to be signed, extract 2 rightmost bytes from the result, interpret them as a big-endian unsigned integer and take the last 4 digits in decimal form for display. SHA256 is always used here, no matter what algorithm was used to calculate the original hash.
13
+
Calculate SHA256 from the hash to be signed, extract 2 rightmost bytes from the result,
14
+
interpret them as a big-endian unsigned integer and take the last 4 digits in decimal form for
15
+
display. SHA256 is always used here, no matter what algorithm was used to calculate the
16
+
original hash.
17
+
18
+
Please mind that hash is a real hash byte value (for example, the byte array returned
19
+
from the `md.digest()` call), not the Base64 form used for transport or the popular hexadecimal
20
+
representation.
21
+
22
+
The VC value must be displayed to the user in the browser together with a message asking
23
+
the end user to verify the code matches with the one displayed on their mobile device. The
24
+
user must not proceed if these don't match.
25
+
26
+
[^1]: See https://docs.oracle.com/javase/8/docs/api/java/security/SecureRandom.html
11
27
12
-
Please mind that hash is a real hash byte value (for example, the byte array returned from the md.digest() call), not the Base64 form used for transport or the popular hexadecimal representation.
28
+
#### 2.3.13.3 Verifying the authentication response
13
29
14
-
The VC value must be displayed to the user in the browser together with a message asking the end user to verify the code matches with the one displayed on their mobile device. The user must not proceed if these don't match.
30
+
After receiving the transaction response from the Session status API call, the following
31
+
algorithm must be used to decide, if the authentication result is trustworthy and what the identity
32
+
of the authenticating end user is.
15
33
16
-
## 2.3.13.3 Verifying the authentication response
17
-
After receiving the transaction response from the Session status API call, the following algorithm must be used to decide, if the authentication result is trustworthy and what the identity of the authenticating end user is.
34
+
-`result.endResult` has the value `OK`.
35
+
- The certificate from `cert.value` is valid:
36
+
- The certificate is trusted (signed by a trusted CA).
37
+
- The certificate has not expired.
38
+
- The person's certificate given in the `cert.value` is of required or higher assurance level
39
+
as requested.
40
+
- The identity of the authenticated person is in the `subject` field or `subjectAltName`
41
+
extension of the X.509 certificate.
42
+
-`signature.value` is the valid signature over the same `hash`, which was submitted by
43
+
the RP verified using the public key from `cert.value`.
18
44
19
-
result.endResult has the value OK.
20
-
The certificate from cert.value is valid:
21
-
The certificate is trusted (signed by a trusted CA).
22
-
The certificate has not expired.
23
-
The person's certificate given in the cert.value is of required or higher assurance level as requested.
24
-
The identity of the authenticated person is in the subject field or subjectAltName extension of the X.509 certificate.
25
-
signature.value is the valid signature over the same hash, which was submitted by the RP verified using the public key from cert.value.
26
-
It is strongly recommended to have these steps performed using standard cryptographic libraries.
45
+
It is strongly recommended to have these steps performed using standard cryptographic
46
+
libraries.
27
47
28
-
After successful authentication, the RP must invalidate the old user's browser or API session identifier and generate a new one.
48
+
After successful authentication, the RP must invalidate the old user's browser or API
0 commit comments