Commit 74de28ca authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Add 3gpp specs/code cleanup

parent 522d11a5
......@@ -59,25 +59,19 @@ The OpenAirInterface CN AUSF software is composed of the following parts:
<pre>
openair-cn5g-ausf
<<<<<<< HEAD
├── 3gpp-specs: Directory containing 3GPP specification files (YAML) used to implement AUSF network function.
├── build: Build directory, contains targets and object files generated by compilation of network functions.
├── log: Directory containing build log files.
├── scripts: Directory containing scripts for building network functions.
├── 3gpp-specs: Directory containing 3GPP specification files (YAML) used to implement AUSF network function.
├── build: Build directory, contains targets and object files generated by compilation of network functions.
├── log: Directory containing build log files.
├── scripts: Directory containing scripts for building network functions.
└── ausf: Directory containing CMakefile.txt and object files generated by compilation of AUSF network function.
├── ci-scripts: Directory containing the script files for CI framework.
├── docs: Directory containing the documentation files.
├── etc: Directory containing the configuration file to be deployed for AUSF.
└── src: Source files of AUSF.
├── ci-scripts: Directory containing the script files for CI framework.
├── docs: Directory containing the documentation files.
├── etc: Directory containing the configuration file to be deployed for AUSF.
└── src: Source files of AUSF.
├── 5gaka: Security algorimth implementation.
├── api-server: AUSF services APIs.
├── common: Common header files
│   └── utils: Common utilities.
├── common: Common header files
│   └── utils: Common utilities.
├── oai_ausf: AUSF main directory, contains the "main" CMakeLists.txt file.
└── ausf_app: AUSF network functions procedures and contexts.
=======
├── ci-scripts: Directory containing the script files for CI framework.
└── src: Source files of AUSF.
├── common: Common header files
>>>>>>> Initial Commit
</pre>
......@@ -22,7 +22,7 @@
/*! \file authentication_algorithms_with_5gaka.cpp
\brief
\brief Based on https://github.com/OPENAIRINTERFACE/openair-hss
\author Jian Yang, Fengjiao He, Hongxin Wang
\author Jian Yang, Fengjiao He, Hongxin Wang, Tien Thinh Nguyen
\company
\date 2020
\email: email: contact@openairinterface.org
......
......@@ -22,7 +22,7 @@
/*! \file rijndael.cpp
\brief
\brief Based on https://github.com/OPENAIRINTERFACE/openair-hss
\author Jian Yang, Fengjiao He, Hongxin Wang
\author Jian Yang, Fengjiao He, Hongxin Wang, Tien Thinh Nguyen
\company
\date 2020
\email: email: contact@openairinterface.org
......@@ -55,6 +55,7 @@ u8 S[256] = {
140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187,
22,
};
/*------- This array does the multiplication by x in GF(2^8) ------*/
u8 Xtime[256] = {
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28,
......@@ -115,7 +116,7 @@ void Authentication_5gaka::RijndaelKeySchedule(const uint8_t key[16]) {
return;
}
/************ internal functions ******************/
//------------------------------------------------------------------------------
void KeyAdd(u8 state[4][4], u8 roundKeys[11][4][4], int round) {
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++) state[i][j] ^= roundKeys[round][i][j];
......
......@@ -67,6 +67,7 @@ std::string sha256(std::string input);
#define Sha256_F2(x) (SHA2_ROTR(x, 6) ^ SHA2_ROTR(x, 11) ^ SHA2_ROTR(x, 25))
#define Sha256_F3(x) (SHA2_ROTR(x, 7) ^ SHA2_ROTR(x, 18) ^ SHA2_SHFR(x, 3))
#define Sha256_F4(x) (SHA2_ROTR(x, 17) ^ SHA2_ROTR(x, 19) ^ SHA2_SHFR(x, 10))
#define SHA2_UNPACK32(x, str) \
{ \
*((str) + 3) = (uint8)((x)); \
......@@ -74,6 +75,7 @@ std::string sha256(std::string input);
*((str) + 1) = (uint8)((x) >> 16); \
*((str) + 0) = (uint8)((x) >> 24); \
}
#define SHA2_PACK32(str, x) \
{ \
*(x) = ((uint32) * ((str) + 3)) | ((uint32) * ((str) + 2) << 8) | \
......
......@@ -135,7 +135,7 @@ void DefaultApi::rg_authentications_post_handler(
void DefaultApi::ue_authentications_auth_ctx_id5g_aka_confirmation_put_handler(
const Pistache::Rest::Request& request,
Pistache::Http::ResponseWriter response) {
Logger::ausf_server().info("Received 5g_aka_confirmation put Request");
Logger::ausf_server().info("Received 5g_aka_confirmation Request");
// Getting the path params
auto authCtxId = request.param(":authCtxId").as<std::string>();
Logger::ausf_server().info(
......
......@@ -71,7 +71,6 @@ void setUpUnixSignals(std::vector<int> quitSignals) {
#endif
using namespace oai::ausf_server::api;
// using namespace oai::ausf::api;
using namespace oai::ausf::app;
void AUSFApiServer::init(size_t thr) {
......
......@@ -48,8 +48,8 @@
#include "ausf_app.hpp"
using namespace oai::ausf_server::api;
// using namespace oai::ausf::api;
using namespace oai::ausf::app;
class AUSFApiServer {
public:
AUSFApiServer(Pistache::Address address, ausf_app* ausf_app_inst)
......
......@@ -21,10 +21,10 @@
/*! \file ausf_app.cpp
\brief
\author Tien-Thinh NGUYEN, Jian Yang, Fengjiao He, Hongxin Wang
\author Jian Yang, Fengjiao He, Hongxin Wang, Tien-Thinh NGUYEN
\company Eurecom
\date 2021
\email: Tien-Thinh.Nguyen@eurecom.fr
\email: contact@openairinterface.org
*/
#include "ausf_app.hpp"
......
......@@ -24,7 +24,7 @@
\author Tien-Thinh NGUYEN
\company Eurecom
\date 2021
\email: Tien-Thinh.Nguyen@eurecom.fr
\email:
*/
#ifndef FILE_AUSF_APP_HPP_SEEN
......
......@@ -21,10 +21,10 @@
/*! \file ausf_client.cpp
\brief
\author Tien-Thinh NGUYEN, Jian Yang, Fengjiao He, Hongxin Wang
\author Jian Yang, Fengjiao He, Hongxin Wang, Tien-Thinh NGUYEN
\company Eurecom
\date 2020
\email: Tien-Thinh.Nguyen@eurecom.fr
\email:
*/
#include "ausf_client.hpp"
......
......@@ -23,7 +23,7 @@
\author Tien-Thinh NGUYEN
\company Eurecom
\date 2020
\email: Tien-Thinh.Nguyen@eurecom.fr
\email:
*/
#ifndef FILE_AUSF_CLIENT_HPP_SEEN
......
......@@ -21,7 +21,7 @@
/*! file
brief
author Jian Yang,Fengjiao He,Hongxin Wang
author
date 2020
email: contact@openairinterface.org
*/
......@@ -66,9 +66,9 @@ void Logger::_init(
std::stringstream ss;
ss << "[%Y-%m-%dT%H:%M:%S.%f] [" << app << "] [%n] [%l] %v";
m_config = new _Logger("configurations", m_sinks, ss.str().c_str());
m_system = new _Logger("system", m_sinks, ss.str().c_str());
m_ausf_app = new _Logger("ausf_app", m_sinks, ss.str().c_str());
m_config = new _Logger("configurations", m_sinks, ss.str().c_str());
m_system = new _Logger("system", m_sinks, ss.str().c_str());
m_ausf_app = new _Logger("ausf_app", m_sinks, ss.str().c_str());
m_ausf_server = new _Logger("ausf_server", m_sinks, ss.str().c_str());
}
......
......@@ -21,7 +21,7 @@
/*! file
brief
author Jian Yang,Fengjiao He,Hongxin Wang
author
date 2020
email: contact@openairinterface.org
*/
......@@ -85,7 +85,7 @@ class Logger {
static _Logger& config() { return *singleton().m_config; }
static _Logger& system() { return *singleton().m_system; }
static _Logger &ausf_app(){return *singleton().m_ausf_app;}
static _Logger& ausf_app() { return *singleton().m_ausf_app; }
static _Logger& ausf_server() { return *singleton().m_ausf_server; }
private:
......@@ -106,7 +106,7 @@ class Logger {
_Logger* m_config;
_Logger* m_system;
_Logger *m_ausf_app;
_Logger* m_ausf_app;
_Logger* m_ausf_server;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment