Skip to content
This repository has been archived by the owner on Aug 4, 2019. It is now read-only.

Provisioning format #86

Open
masoodkamyab opened this issue Jan 16, 2019 · 7 comments
Open

Provisioning format #86

masoodkamyab opened this issue Jan 16, 2019 · 7 comments
Assignees
Labels
enhancement new feature or request

Comments

@masoodkamyab
Copy link
Contributor

masoodkamyab commented Jan 16, 2019

A real-world example

version:1+expdate:4+cryptomoduleId:1+length:1+timeInterval:1+bankId:1+seed:20+name:~14
Field Length Value Binary
version 1 1 \x01
expireDate 4 220101 \x00\x03\x5b\xc5
cryptomoduleId 1 1 \x01
bankId 1 2 \x02
length 1 4 \x4
time_interval 1 60 \x3c
seed 20 abcdefghijklmnopqrst \x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74
name 14 abcdefghijklmn \x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e

After bundling:

\x01\x00\x02\xe7\x06\x01\x04<\x02abcdefghijklmnopqrstabcdefghijklmn

After adding checksum

\x01\x00\x02\xe7\x06\x01\x04<\x02abcdefghijklmnopqrstabcdefghijklmn5540

After encrypt with IV=abcdefghijklmnop and secret=abcdefghijklmnopqrstuvwxyz123456

abcdefghijklmnop\x17\x05\xb3\xe0\x0f\xd3Qcb\r\xd9\x90\x15\x1dr\xf4&\x19\xee\xf5\x15\xd2\\\x08\xbe\xd9OD\x91\xbc 
\xf4\x9e\xbd\xe0\xb9j\xd9zA\x11\x0bNX\x8e\xeb4\xe7\xee
@hamedaakhlaghi
Copy link

hamedaakhlaghi commented Jan 19, 2019

@masoodkamyab Is the secret in bind response a URL safe base64?

@pylover
Copy link
Member

pylover commented Jan 19, 2019

@hamedaakhlaghi, Yes all base64 encoded tokens are url-encoded base64:

    def to_dict(self):
        return dict(
            name=self.name,
            secret=base64.urlsafe_b64encode(self.secret),
        )

@EhsanMashhadi
Copy link

@masoodkamyab Is this issue closed and is it final?

@EhsanMashhadi
Copy link

Where are otpLength and timeInteral?

@pylover
Copy link
Member

pylover commented Jan 20, 2019

@EhsanMashhadi

Sorry,

These information was missed in the description above:

version:1+expdate:4+cryptomoduleId:1+length:1+timeInterval:1+bankId:1+seed:20+name:~14

@masoodkamyab
Copy link
Contributor Author

@EhsanMashhadi I update the table and add enumerators to mobile-token-isc this URL

@EhsanMashhadi
Copy link

I should mention that from the above sample:
expire date = 220101 = 2022/01/01

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement new feature or request
Projects
None yet
Development

No branches or pull requests

4 participants