<commit_before>/*
 * Signed key module implementation
 *
 * Copyright (c) 2015 Wind River Systems, Inc.
 *
 * See "LICENSE" for license terms.
 *
 * Author: <NAME> <<EMAIL>>
 */

#include <eee.h>
#include <err_status.h>
#include <cln_fw.h>
#include "internal.h"
#include "class.h"
#include "csbh.h"
#include "skm.h"

#define SKM_SIZE		(32 * 1024)
#define SKM_OFFSET		(0x28000)

#pragma pack(1)

typedef struct {
	uint32_t ModulusSize;
	uint32_t ExponentSize;
	uint8_t Modulus[256];
	uint32_t Exponent;
} stage1_rsa_pubkey_t;

#pragma pack()

typedef struct {
	csbh_context_t *csbh;
	stage1_rsa_pubkey_t *stage1_key;
} skm_internal_t;

unsigned long
skm_size(void)
{
	return SKM_SIZE;
}<commit_msg>Fix the wrong offset used to probe skm<commit_after>/*
 * Signed key module implementation
 *
 * Copyright (c) 2015 Wind River Systems, Inc.
 *
 * See "LICENSE" for license terms.
 *
 * Author: <NAME> <<EMAIL>>
 */

#include <eee.h>
#include <err_status.h>
#include <cln_fw.h>
#include "internal.h"
#include "class.h"
#include "csbh.h"
#include "skm.h"

#define SKM_SIZE		(32 * 1024)
#define SKM_OFFSET		(-0x28000)

#pragma pack(1)

typedef struct {
	uint32_t ModulusSize;
	uint32_t ExponentSize;
	uint8_t Modulus[256];
	uint32_t Exponent;
} stage1_rsa_pubkey_t;

#pragma pack()

typedef struct {
	csbh_context_t *csbh;
	stage1_rsa_pubkey_t *stage1_key;
} skm_internal_t;

unsigned long
skm_size(void)
{
	return SKM_SIZE;
}
{'fraction_non_alphanumeric': 0.12746478873239436, 'fraction_numerical': 0.04225352112676056, 'mean_word_length': 4.847736625514403, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2797081', 'n_tokens_mistral': 637, 'n_tokens_neox': 593, 'n_words': 143}