Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2
You last visited: Today at 10:15

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



GF New KeyAgreement

Discussion on GF New KeyAgreement within the Metin2 forum part of the Popular Games category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2024
Posts: 5
Received Thanks: 0
GF New KeyAgreement

Hello guys,
I found out they changed from RFC 5114 to RFC 8998 for the KeyAgreement.

Code:
uint32_t KeyAgreement::prepare(void* buffer, uint32_t* length)
{
	CryptoPP::AutoSeededX917RNG<CryptoPP::Rijndael> rng;

	auto values = CryptoPP::ASN1::secp256r1().GetValues();

	m_domain.AccessGroupParameters().Initialize(CryptoPP::ASN1::secp256r1());
	if (!m_domain.GetGroupParameters().ValidateGroup(rng, 3))
	{
		return 0;
	}

	m_privateKey.New(m_domain.PrivateKeyLength());
	m_publicKey.New(m_domain.PublicKeyLength());

	m_domain.GenerateKeyPair(rng, m_privateKey, m_publicKey);
	size_t dataLength = m_publicKey.size();
	if (*length < dataLength)
	{
		return 0;
	}

	*length = dataLength;
	memcpy(buffer, m_publicKey.data(), dataLength);

	return m_domain.AgreedValueLength();
}

bool KeyAgreement::agree(uint32_t agreeLength, const void* buffer, uint32_t length)
{
	if (agreeLength != m_domain.AgreedValueLength() || length != m_domain.PublicKeyLength())
	{
		return false;
	}

	m_sharedKey.New(agreeLength);
	CryptoPP::SecByteBlock pubKey((const uint8_t*)buffer, length);
	if (!m_domain.Agree(m_sharedKey, m_privateKey, pubKey))
	{
		return false;
	}

	CryptoPP::Integer sharedKey(m_sharedKey.data(), m_sharedKey.size());
	if (sharedKey == 0)
	{
		return false;
	}

	return true;
}
Cy0rk is offline  
Reply


Similar Threads Similar Threads
[METIN2_GF]New KeyAgreement + PacketEncryption
01/05/2017 - Metin2 Hacks, Bots, Cheats, Exploits & Macros - 4 Replies
#removed
|NEW|NEW|NEW|Handy/SMS Payment! NEW|NEW|NEW|
08/16/2012 - elite*gold Trading - 11 Replies
Hallo liebe Epvpers user Und zwar ihr Fragt euch was hat das den aufsich? Naja ich werde hier immer Treasure Posten wo ihr 10€ Payment guthaben kaufen könnt! Also ablaufen wird das so ________________ Bei sms: In jedem Treasure ist eine Handy nummer drinne die ist wichtig damit ich nacher nachvollziehen kann welches zu welchem Gehört Bei SMS Payment Gibt ihr bei der seite die nummer einfach an dann erhalte ich einen Code! den erfragt ihr Per pn! ________________ Bei Anruf Payment:
|NEW|NEW|NEW|Handy/SMS Payment! NEW|NEW|NEW|
08/14/2012 - elite*gold Trading - 0 Replies
.
New Private server Update new skill ... new item . . .. New avata . . . New map. . .
01/19/2011 - Cabal Private Server - 54 Replies
Web :cabalvn.net YouTube - CabalVN Big Update.mpg ]Remember This server is EP2 with newskill..New map..new item and inferno mob have only in channel hard core 3 New channel 4 . . .for farm New Item Change Kit (Hair Syle) - Fever:http://images.plurk.com/3399722_2392a65b4121 5880b03fecf8455271e7.jpg http://images.plurk.com/3399722_a1fea1218f6a2d19d ef18830a9b41a85.jpg Ring of Luck and Ring of crit :http://ca6.upanh.com/12.452.16684262.CPH0/cabalvn net1283018347rin.jpg FS new skill...
NEW!!NEW!!NEW!!NEW!!NEW!!NEW!!
12/07/2008 - Off Topic - 3 Replies
all ther are say shit and fail are noobs



All times are GMT +2. The time now is 10:15.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.