This file is indexed.

/usr/lib/python3/dist-packages/axolotl/state/prekeyrecord.py is in python3-axolotl 0.1.39-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- coding: utf-8 -*-

from .storageprotos_pb2 import PreKeyRecordStructure
from ..ecc.curve import Curve
from ..ecc.eckeypair import ECKeyPair


class PreKeyRecord:
    def __init__(self, _id=None, ecKeyPair=None, serialized=None):
        self.structure = PreKeyRecordStructure()
        if serialized:
            self.structure.ParseFromString(serialized)
        else:
            self.structure.id = _id
            self.structure.publicKey = ecKeyPair.getPublicKey().serialize()
            self.structure.privateKey = ecKeyPair.getPrivateKey().serialize()

    def getId(self):
        return self.structure.id

    def getKeyPair(self):
        publicKey = Curve.decodePoint(bytearray(self.structure.publicKey), 0)
        privateKey = Curve.decodePrivatePoint(bytearray(self.structure.privateKey))
        return ECKeyPair(publicKey, privateKey)

    def serialize(self):
        return self.structure.SerializeToString()