PDA

View Full Version : Build LMCrypt without LM_SEED3?



wssh
2020-06-09, 04:04 PM
Does anyone know how to build lmcrypt without LM_SEED3?

I have LM_SEED1 and LMSEED2

I have used lmcryptgui and gotten working license but how is this accomplished?

Is there an option in the SDK to use to ignore LM_SEED3


how does one build using only 2 seeds same as lmcryptgui?

What am I missing?

Setting LM_SEED3 to random produces incorrect licenses from compiled lmcrypt.exe ...

BfoX
2020-06-10, 12:12 AM
RTFM flexlm manual - VENDOR_KEY1/2/3/4 and LM_SEED1/2/3 is differerent
VENDOR_KEY1/2 use to generele standard 20 or 16 length sequense or short 12 length SIGN, VENDOR_KEY3/4 will be use for long SIGN.
lmseed 1/2/3 for any long SIGN.

/*
* Private SEEDs: Make up 3, 8-hex-char numbers, replace and
* guard securely. You can also use the command
* 'lmrand1 -seed' to make these numbers up
*/
#define LM_SEED1 0x12345678
#define LM_SEED2 0x87654321
#define LM_SEED3 0xabcdef01


/*
* If you're not using CRO, leave this as
* LM_STRENGTH_DEFAULT. If you're upgrading from
* pre-v7.1, and want no changes, set this to
* LM_STRENGTH_LICENSE_KEY.
* -----------------------------------------------
* LM_STRENGTH Options are
* LM_STRENGTH_DEFAULT:
* Public key protection unused. Use SIGN=
* attribute. sign length = 12
* CRO:
* LM_STRENGTH_113BIT, LOW: sign length= 58 chars
* LM_STRENGTH_163BIT, MEDIUM:sign length= 84 chars
* LM_STRENGTH_239BIT, HIGH: sign length=120 chars
* Pre-v7.1:
* LM_STRENGTH_LICENSE_KEY: Use old license-key
*/
/*
* CRO Keys: Provided by Macrovision if CRO used
* Turned off by default. Be sure to set
* LM_STRENGTH above if CRO_KEYs are non-zero
*/

wssh
2020-06-10, 01:00 AM
lm_seeds.h

---

#undef ENCRYPTION_SEED1
#undef ENCRYPTION_SEED2
#undef ENCRYPTION_SEED3
#undef ENCRYPTION_SEED4
#define ENCRYPTION_SEED1 0x25886387
#define ENCRYPTION_SEED2 0xde6a60f1
#define ENCRYPTION_SEED3 0x4bb77d13
#define ENCRYPTION_SEED4 0x11dea93f


---


if exist lm_new.c del lm_new.c
lmnewgen.exe INTEL
v8.1+ FlexNet, non-TRL
ENCRYPTION_SEEDs or LM_SEEDs in lm_code.h
are non-unique. Set them to 32-bit values
that you make up, and never change them.
And make sure you keep safe copies.
You can use "lmrand1 -seed" to make up numbers if you prefer.
Exiting.
NMAKE : fatal error U1077: '.\lmnewgen.exe' : return code '0x1'
Stop.

-------------
lm_code.h

--------------


#ifndef LM_CODE_H
#define LM_CODE_H
#include "lm_trl.h"
/*
* Vendor keys: Enter keys received from Flexera Software LLC.
* Changing keys has NO impact on license files
* (unlike LM_SEEDs).
*/
#define VENDOR_KEY1 0x25886387
#define VENDOR_KEY2 0xde6a60f1
#define VENDOR_KEY3 0x4bb77d13
#define VENDOR_KEY4 0x11dea93f
#define VENDOR_KEY5 0x6a3d64e0
/*
* Vendor name. Leave "demo" if evaluating. Otherwise,
* set to your vendor daemon name.
*/
#define VENDOR_NAME "INTEL"
/*
* Private SEEDs: Make up 3, 8-hex-char numbers, replace and
* guard securely. You can also use the command
* 'lmrand1 -seed' to make these numbers up.
*/
#define LM_SEED1 0x25886387
#define LM_SEED2 0xde6a60f1
#define LM_SEED3 0xdeadc0de
/*
* Pick an LM_STRENGTH:
*/
#define LM_STRENGTH LM_STRENGTH_DEFAULT
/*
* LM_STRENGTH Options are
* LM_STRENGTH_DEFAULT:
* Public key protection unused. Use SIGN=
* attribute. sign length = 12
* TRL:
* LM_STRENGTH_113BIT, LOW: sign length= 60 chars
* LM_STRENGTH_163BIT, MEDIUM:sign length= 84 chars
* LM_STRENGTH_239BIT, HIGH: sign length=120 chars
* Pre-v7.1:
* LM_STRENGTH_LICENSE_KEY: Use old license-key.
* If you're upgrading from
* pre-v7.1, and want no changes, set this to
* LM_STRENGTH_LICENSE_KEY.
*/
/*
* TRL Keys: Provided by Flexera Software LLC, if TRL is used.
* Be sure to set LM_STRENGTH to
* LM_STRENGTH_DEFAULT, above, if TRL_KEYs are zero.
*/
#define TRL_KEY1 0x0
#define TRL_KEY2 0x0

---


is there some other file to edit?


--------------

v8.1+ FlexNet, non-TRL
ENCRYPTION_SEEDs or LM_SEEDs in lm_code.h
are non-unique. Set them to 32-bit values
that you make up, and never change them.
And make sure you keep safe copies.
You can use "lmrand1 -seed" to make up numbers if you prefer.
Exiting.
NMAKE : fatal error U1077: '.\lmnewgen.exe' : return code '0x1'
Stop.

E:\Flexnet publisher 11.14\FlexNet Publisher for Windows on x86, 32-bit\i86_n3-11.14.0.0_v6\i86_n3>


Do I need to edit lm_code2.h?

Do you have the manual?

I can't download because -rep. Trying to learn. I have SDK 11.14.. It's setup weird. I tried to download video build your own lmcrypt.. Can't... if you could use gofile.io to upload manual?

I was pretty sure I had everything right. now I'm confused even more.

what goes in lmseeds.h??


------------

#undef ENCRYPTION_SEED1
#undef ENCRYPTION_SEED2
#undef ENCRYPTION_SEED3
#undef ENCRYPTION_SEED4
#define ENCRYPTION_SEED1 0x25886387
#define ENCRYPTION_SEED2 0xde6a60f1
#define ENCRYPTION_SEED3 0x4bb77d13
#define ENCRYPTION_SEED4 0x11dea93f



still prouces error.

BfoX
2020-06-10, 04:52 AM
you have VENDOR_KEY1 = LM_SEED1 and VENDOR_KEY2 = LM_SEED2

wssh
2020-06-10, 04:56 AM
Is there some way to contact you to better discuss this? IRC? I'm not sure how I'm supposed to use vendor code when there's two places in SDK one for seeds and one for vendor codes.

BfoX
2020-06-10, 02:56 PM
discuss about?
i told you about recovery ENCRYPTION_SEED1/2 and old way the license generations.
for all other way you need use the path with the fake LM_SEED1/2/3

wssh
2020-06-11, 03:12 AM
I don't know where I'm supposed to include the vendor keys from keygen if not here:



/*
* Vendor keys: Enter keys received from Flexera Software LLC.
* Changing keys has NO impact on license files
* (unlike LM_SEEDs).
*/
#define VENDOR_KEY1 0x0
#define VENDOR_KEY2 0x0
#define VENDOR_KEY3 0x0
#define VENDOR_KEY4 0x0
#define VENDOR_KEY5 0x0
/*



LM seeds extracted from Daemon here:



/*
* Private SEEDs: Make up 3, 8-hex-char numbers, replace and
* guard securely. You can also use the command
* 'lmrand1 -seed' to make these numbers up.
*/
#define LM_SEED1 0x12345678
#define LM_SEED2 0x87654321
#define LM_SEED3 0xabcdef01
/*



3rd seed is random made up by me as no way to recover.



#define LM_STRENGTH LM_STRENGTH_DEFAULT
/*
* LM_STRENGTH Options are
* LM_STRENGTH_DEFAULT:
* Public key protection unused. Use SIGN=
* attribute. sign length = 12
* TRL:
* LM_STRENGTH_113BIT, LOW: sign length= 60 chars
* LM_STRENGTH_163BIT, MEDIUM:sign length= 84 chars
* LM_STRENGTH_239BIT, HIGH: sign length=120 chars
* Pre-v7.1:
* LM_STRENGTH_LICENSE_KEY: Use old license-key.
* If you're upgrading from
* pre-v7.1, and want no changes, set this to
* LM_STRENGTH_LICENSE_KEY.
*/
/*


LM_STRENGTH is default according to short sign and TRL keys are zero, because LM_STRENGTH DEFAULT:




* TRL Keys: Provided by Flexera Software LLC, if TRL is used.
* Be sure to set LM_STRENGTH to
* LM_STRENGTH_DEFAULT, above, if TRL_KEYs are zero.
*/
#define TRL_KEY1 0x0
#define TRL_KEY2 0x0


#include "lm_code2.h"
#endif /* LM_CODE_H */



The only file mentioning ENCRYPTION SEEDS: lm_code2.h



#ifndef LM_SIGN_LEVEL
#define LM_SIGN_LEVEL 9999 /* Error */
#endif /* Errors */

#ifndef ENCRYPTION_SEED1 /* New v8.1+ ISV */
#define ENCRYPTION_SEED1 0
#define ENCRYPTION_SEED2 0
#endif /* ENCRYPTION_SEED1 */
#ifndef ENCRYPTION_SEED3 /* Didn't use v7.2 */
#define ENCRYPTION_SEED3 0
#define ENCRYPTION_SEED4 0
#endif /* ENCRYPTION_SEED3 */


So this need edit? I thought these were auto generated at compile?



Am I wrong where to put or do I use Vendorkey 1,2 as LM_seed because:



/*
* Vendor keys: Enter keys received from Flexera Software LLC.
* Changing keys has NO impact on license files
* (unlike LM_SEEDs).
*/


So how do vendor keys make license? I use as seeds? wtf. see confused.

Furthermore: Lmcryptgui.exe makes an EXECUTEABLE which only needs SEEDS to generate. NOT vendor keys!

Explain. I'm not trying to be annoying or a dick. I seriously just want to understand! I love knowledge. Sorry If I waste your time.

BfoX
2020-06-11, 04:33 AM
/* Version 11 keys */
#define VENDOR_KEY1 0x25886387
#define VENDOR_KEY2 0xde6a60f1
#define VENDOR_KEY3 0x4bb77d13
#define VENDOR_KEY4 0x11dea93f
#define VENDOR_KEY5 0x6a3d64e0
#define TRL_KEY1 0x6e584e83
#define TRL_KEY2 0x6367043b

#define VENDOR_NAME "INTEL"

VENDOR_KEY1/2/3/4 from the Flexera Software LLC

ENCRYPTION_SEED1/2/3/4 from INTEL - can be recovered ENCRYPTION_SEED1/2

LM_SEED1/2/3 from INTEL - not possible to recovery, private key set hold INTEL, public key set used to validate LONG SIGN

it all

wssh
2020-06-11, 09:41 AM
I think the problem is with the SDK i'm using. No place for encryption seeds. I looked for 9.2 but the only copy I could find is corrupt. Anyone got a copy of 9.2 full that isn't missing files?

I was trying 11.14. :\

BfoX
2020-06-11, 04:13 PM
/* Version 9 keys */
#define VENDOR_KEY1 0x71114ae4
#define VENDOR_KEY2 0x02c8ded4
#define VENDOR_KEY3 0xac043b8e
#define VENDOR_KEY4 0x54a02c82
#define VENDOR_KEY5 0x6a3d64e0
#define CRO_KEY1 0xb2b100e6
#define CRO_KEY2 0x30d44d76

#define VENDOR_NAME "INTEL"

from "lm_code.h"



*
* Description: Used to generate lm_new.o/.obj and by license-
* generators.
*
* Once the kit is "built" (using make or nmake) this file is no longer
* needed, but should be stored somewhere safe.
*
* Set the following values:
* VENDOR_KEY1-5 Provided by Macrovision .
* VENDOR_NAME If not evaluating, set to vendor name.
* LM_SEED1-3 Make up 3 32-bit numbers, (or use
* 'lmrand1 -seed' to make up), keep secret, safe,
* and never change.
* CRO_KEY1-2 Provided by Macrovision if CRO used.
* LM_STRENGTH: If using CRO, set to desired length
*
* Upgrading: from version older than 8.1: Copy your
* ENCRYPTION_SEEDs from the old lm_code.h file.
* Make sure LM_STRENGTH matches, if you were
* using LM_STRENGTH
*/


also



/*
* ENCRYPTION_SEED1 and 2
* VENDOR's private encryption seed
* These are 0x87654321 and 0x12345678 by default.
* Each vendor must ensure that you replace these with
* numbers which are unique to your company, and keep these
* numbers secret. Only someone with access to these
* numbers can generate license files that will work with
* your application.
* MAKE SURE the numbers are not left to the defaults.
*/


this done to understang and make own flexlm generator.

wssh
2020-06-12, 03:23 AM
/******************************************************************************
*
* Module: $Id: //stg/eng/flexnet/licensing/c/v10-1/machind/blank_lm_code.h#1 $
*
* COPYRIGHT (c) 1990, 2004 by Macrovision Corporation.
* This software has been provided pursuant to a License Agreement
* containing restrictions on its use. This software contains
* valuable trade secrets and proprietary information of
* Macrovision Corporation and is protected by law. It may
* not be copied or distributed in any form or medium, disclosed
* to third parties, reverse engineered or used in any manner not
* provided for in said License Agreement except with the prior
* written authorization from Macrovision Corporation.
******************************************************************************
*
* Description: Used to generate lm_new.o/.obj and by license-
* generators.
*
* Once the kit is "built" (using make or nmake) this file is no longer
* needed, but should be stored somewhere safe.
*
* Set the following values:
* VENDOR_KEY1-5 Provided by Macrovision Corporation.
* VENDOR_NAME If not evaluating, set to vendor name.
* LM_SEED1-3 Make up 3 32-bit numbers, (or use
* 'lmrand1 -seed' to make up), keep secret, safe,
* and never change.
* TRL_KEY1-2 Provided by Macrovision if TRL used.
* LM_STRENGTH: If using TRL, set to desired length
*
* Upgrading: from version older than 8.1: Copy your
* ENCRYPTION_SEEDs from the old lm_code.h file.
* Make sure LM_STRENGTH matches, if you were
* using LM_STRENGTH
*/

#ifndef LM_CODE_H
#define LM_CODE_H
#include "lm_trl.h"
/*
* Vendor keys: Enter keys received from Macrovision.
* Changing keys has NO impact on license files
* (unlike LM_SEEDs).
*/
#define VENDOR_KEY1 0x035954af
#define VENDOR_KEY2 0xa12ce87d
#define VENDOR_KEY3 0xd858921a
#define VENDOR_KEY4 0xd642974a
#define VENDOR_KEY5 0x6a3d64e1
/*
* Vendor name. Leave "demo" if evaluating. Otherwise,
* set to your vendor daemon name.
*/
#define VENDOR_NAME "INTEL"
/*
* Private SEEDs: Make up 3, 8-hex-char numbers, replace and
* guard securely. You can also use the command
* 'lmrand1 -seed' to make these numbers up.
*/
#define LM_SEED1 0xdeadcafe
#define LM_SEED2 0xc45eef33
#define LM_SEED3 0xdeadc0d3
/*
* Pick an LM_STRENGTH:
*/
#define LM_STRENGTH LM_STRENGTH_DEFAULT
/*
* LM_STRENGTH Options are
* LM_STRENGTH_DEFAULT:
* Public key protection unused. Use SIGN=
* attribute. sign length = 12
* TRL:
* LM_STRENGTH_113BIT, LOW: sign length= 58 chars
* LM_STRENGTH_163BIT, MEDIUM:sign length= 84 chars
* LM_STRENGTH_239BIT, HIGH: sign length=120 chars
* Pre-v7.1:
* LM_STRENGTH_LICENSE_KEY: Use old license-key.
* If you're upgrading from
* pre-v7.1, and want no changes, set this to
* LM_STRENGTH_LICENSE_KEY.
*/
/*
* TRL Keys: Provided by Macrovision Corporation, if TRL is used.
* Be sure to set LM_STRENGTH to
* LM_STRENGTH_DEFAULT, above, if TRL_KEYs are zero.
*/
#define TRL_KEY1 0x0
#define TRL_KEY2 0x0


#include "lm_code2.h"
#endif /* LM_CODE_H */




As you can see my lm_code.h does not have mention of seeds. I think my SDK is missing files/code.

And If I try to define in lm_code.h



*/
#define ENCRYPTION_SEED1 0xEE25A77E
#define ENCRYPTION_SEED2 0xE8FF3A1E
#define VENDOR_KEY1 0x035954ae
#define VENDOR_KEY2 0xa12ce876
#define VENDOR_KEY3 0xd858921c
#define VENDOR_KEY4 0xd642974f
#define VENDOR_KEY5 0x6a3d64e0
/*


On compile - ERROR:



if exist lm_new.c del lm_new.c
lmnewgen.exe INTEL -o lm_new.c
ERROR: Inconsistent lm_code.h file, unknown state
Probably ENCRYPTION_SEEDs or LM_STRENGTH set incorrectly
NMAKE : fatal error U1077: '.\lmnewgen.exe' : return code '0x1'


Do you have a copy of the SDK? Could you upload to gofile.io?

BfoX
2020-06-12, 03:58 AM
why you use different VENDOR_KEY1/2/3/4/5 ?! i give to you valid for v9.x and v11.x of the sdk

wssh
2020-06-12, 03:59 AM
why you use different VENDOR_KEY1/2/3/4/5 ?!



Only changed in post on forum. Not when compiling.

I have lmkeygen3.0. Valid vendor keys are not the problem.

BfoX
2020-06-12, 05:16 AM
FLEXlm SDK v9.2 build with the some set:

/* Version 9 keys */
#define VENDOR_KEY1 0x71114ae4
#define VENDOR_KEY2 0x02c8ded4
#define VENDOR_KEY3 0xac043b8e
#define VENDOR_KEY4 0x54a02c82
#define VENDOR_KEY5 0x6a3d64e0
#define CRO_KEY1 0
#define CRO_KEY2 0

#define VENDOR_NAME "INTEL"

#define ENCRYPTION_SEED1 0xEE25A77E
#define ENCRYPTION_SEED2 0xE8FF3A1E
#define ENCRYPTION_SEED3 0xEE25A77F
#define ENCRYPTION_SEED4 0xE8FF3A1F

#define LM_SEED1 0xdeadcafe
#define LM_SEED2 0xc45eef33
#define LM_SEED3 0xdeadc0d3

#define LM_STRENGTH LM_STRENGTH_DEFAULT

attached....

and with
#define CRO_KEY1 0xb2b100e6
#define CRO_KEY2 0x30d44d76

wssh
2020-06-12, 05:58 AM
I Managed to build lmcrypt.exe in 11.x SDK! Thank you BfoX!



---------
FlexNet Licensing v11.14.0.0 build 183228 (ipv6) i86_n3 (lmgr.lib), Copyright (c) 1988-2016 Flexera Software LLC. All Rights Reserved.


there is a file called lmseeds.h *DUUUH*

LMCODE.h



/******************************************************************************
*
* Module: $Id: //stg/eng/flexnet/licensing/c/v10-1/machind/blank_lm_code.h#1 $
*
* COPYRIGHT (c) 1990, 2004 by Macrovision Corporation.
* This software has been provided pursuant to a License Agreement
* containing restrictions on its use. This software contains
* valuable trade secrets and proprietary information of
* Macrovision Corporation and is protected by law. It may
* not be copied or distributed in any form or medium, disclosed
* to third parties, reverse engineered or used in any manner not
* provided for in said License Agreement except with the prior
* written authorization from Macrovision Corporation.
******************************************************************************
*
* Description: Used to generate lm_new.o/.obj and by license-
* generators.
*
* Once the kit is "built" (using make or nmake) this file is no longer
* needed, but should be stored somewhere safe.
*
* Set the following values:
* VENDOR_KEY1-5 Provided by Macrovision Corporation.
* VENDOR_NAME If not evaluating, set to vendor name.
* LM_SEED1-3 Make up 3 32-bit numbers, (or use
* 'lmrand1 -seed' to make up), keep secret, safe,
* and never change.
* TRL_KEY1-2 Provided by Macrovision if TRL used.
* LM_STRENGTH: If using TRL, set to desired length
*
* Upgrading: from version older than 8.1: Copy your
* ENCRYPTION_SEEDs from the old lm_code.h file.
* Make sure LM_STRENGTH matches, if you were
* using LM_STRENGTH
*/

#ifndef LM_CODE_H
#define LM_CODE_H
#include "lm_trl.h"
#include "lmseeds.h"
/*
* Vendor keys: Enter keys received from Macrovision.
* Changing keys has NO impact on license files
* (unlike LM_SEEDs).
*/

#define VENDOR_KEY1 0x25886387
#define VENDOR_KEY2 0xde6a60f1
#define VENDOR_KEY3 0x4bb77d13
#define VENDOR_KEY4 0x11dea93f
#define VENDOR_KEY5 0x6a3d64e0
/*
* Vendor name. Leave "demo" if evaluating. Otherwise,
* set to your vendor daemon name.
*/
#define VENDOR_NAME "INTEL"
/*
* Private SEEDs: Make up 3, 8-hex-char numbers, replace and
* guard securely. You can also use the command
* 'lmrand1 -seed' to make these numbers up.
*/
#define LM_SEED1 0xdeadcafe
#define LM_SEED2 0xc45eef33
#define LM_SEED3 0xdeadc0d3
/*
* Pick an LM_STRENGTH:
*/
#define LM_STRENGTH LM_STRENGTH_LICENSE_KEY
/*
* LM_STRENGTH Options are
* LM_STRENGTH_DEFAULT:
* Public key protection unused. Use SIGN=
* attribute. sign length = 12
* TRL:
* LM_STRENGTH_113BIT, LOW: sign length= 58 chars
* LM_STRENGTH_163BIT, MEDIUM:sign length= 84 chars
* LM_STRENGTH_239BIT, HIGH: sign length=120 chars
* Pre-v7.1:
* LM_STRENGTH_LICENSE_KEY: Use old license-key.
* If you're upgrading from
* pre-v7.1, and want no changes, set this to
* LM_STRENGTH_LICENSE_KEY.
*/
/*
* TRL Keys: Provided by Macrovision Corporation, if TRL is used.
* Be sure to set LM_STRENGTH to
* LM_STRENGTH_DEFAULT, above, if TRL_KEYs are zero.
*/
#define TRL_KEY1 0x0
#define TRL_KEY2 0x0


#include "lm_code2.h"
#endif /* LM_CODE_H */


LMSEEDS.h:




#undef ENCRYPTION_SEED1
#undef ENCRYPTION_SEED2
#undef ENCRYPTION_SEED3
#undef ENCRYPTION_SEED4
#define ENCRYPTION_SEED1 0xEE25A77F
#define ENCRYPTION_SEED2 0xF762C3A4
#define ENCRYPTION_SEED3 0xBABEFACE
#define ENCRYPTION_SEED4 0xC0D3F00D



file compiles and build valid .lic file with this command:



lmcrypt.exe -i lictest_wssh.txt -o wsshh_fullsign2.lic -verfmt 7.1 -longkey


or:


lmcrypt.exe -i lictest_wssh.txt -o FLEXLM11-SHADYSIGN.lic

THANK YOU SO MUCH AGAIN BfoX!!!!!!!

istigatore
2020-09-08, 03:15 AM
Intel as far i know still use standard licensing even if the vendor use trusted storage.. Standard license is enough without the ECC patch..