Comments (1)
I think PyHSS only supports OPC
you can calculate the OPC from the OP and KI (OPC = AES128(ki,OP) XOR OP)
I did something in python to do this:
from Crypto.Cipher import AES
import binascii
def calculate_opc(ki, op):
# Convert the Ki and OP values from hex strings to byte arrays
ki_bytes = binascii.unhexlify(ki)
op_bytes = binascii.unhexlify(op)
# Create a new AES object with the Ki value as the key
aes = AES.new(ki_bytes, AES.MODE_ECB)
# Use the AES object to encrypt the OP value
encrypted_op = aes.encrypt(op_bytes)
# XOR the encrypted OP value with the original OP value to get the OPC value
opc = bytearray(len(op_bytes))
for i in range(len(op_bytes)):
opc[i] = encrypted_op[i] ^ op_bytes[i]
# Convert the OPC value to a hex string and return it
return binascii.hexlify(opc).decode('utf-8')
ki = (input('Enter Ki: '))
op = (input('Enter Op: '))
opc = calculate_opc(ki, op)
print('OPc: ' + opc)
from pyhss.
Related Issues (20)
- Geored EIR Sync Actions
- serving_apn only stores one APN per UE
- License for PyHSS code? HOT 3
- Add Prom Counters for GeoRed
- connection to IPFS
- Diameter tests not running
- The version of python and mysql
- SCTP does not work HOT 1
- service `hssService.py` not starting HOT 1
- pyHSS Authentication Algorithm using MD5 instead of AKAv1-MD5
- Set User Agent in Geored Pusher HOT 1
- Answer_16777238_272() is storing the wrong Diameter remote_peer which breaks async messages when a DRA is used
- PyHSS is sending AVP Rating-Group(432) in the Gx credit control answer causing SMF to crash. HOT 2
- invalid TFT sent in Gx Re-Auth Request AVP: Flow-Description(507) HOT 1
- Firmware Revision in CEA is wrong HOT 1
- Add Supported Features AVP for AA-Answer HOT 1
- backup from the subscribers added to pyhss HOT 1
- Docker/Docker Compose: can't open file 'hss.py'
- PyHSS HSS Not Connecting to Redis-Server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyhss.