All times are UTC - 5 hours [ DST ]


Forum rules


Please do not post questions about data recovery cases here (use this forum instead). This forum is for topics on finding new ways to recover data. Accessing firmware, writing programs, reading bits off the platter, recovering data from dust...



Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: About ECC BCH problem in latest SM MicroSD/SD controllers
PostPosted: December 6th, 2023, 5:24 
Offline

Joined: September 23rd, 2019, 2:55
Posts: 60
Location: Poland
Have any of you tried to figure out how BCH works in the latest Silicon Motion controllers used in latest Samsung MicroSD cards and others such as Sandisk SD ImageMate series, where the SA_ECC structure is 16_16 and is easily corrected with a 285 polynomial, while the data area does not work with any primitive polynomial and different bit rotation, inversion and ECC before XOR where the ECC length is e.g. 114B, 124B ? In the times when FE was still alive, Sergej claimed that ECC in these memories is not BCH, which I cannot agree with, there must be some trick or non-standard polynomial that was used to generate ECC, because if SA is standard BCH, why for Data should be used some other error correction algorithm?

ps. In VNR I do seach polynomial for Data ECC by degree 8,9,10,11,12,13,14,15,16 and I didn't have any hits :(


Top
 Profile  
 
 Post subject: Re: About ECC BCH problem in latest SM MicroSD/SD controller
PostPosted: December 6th, 2023, 11:51 
Offline
User avatar

Joined: July 8th, 2019, 12:27
Posts: 148
Location: 中国大陆浙江省湖州市
I left you a message on Skype

_________________
Auxiliary Tool Used For MonoLith Data Recovery, featuring the industry's most extensive Monolith pinouts
http://flash-matrix.com/


Top
 Profile  
 
 Post subject: Re: About ECC BCH problem in latest SM MicroSD/SD controller
PostPosted: December 6th, 2023, 15:15 
Offline

Joined: September 23rd, 2019, 2:55
Posts: 60
Location: Poland
csava wrote:
I left you a message on Skype
OK, but I do not have skype ;) Have you tried to solve this problem? I suspect that maybe the data is xored with a second additional key, btw. a very strange thing.


Top
 Profile  
 
 Post subject: Re: About ECC BCH problem in latest SM MicroSD/SD controller
PostPosted: December 6th, 2023, 21:13 
Offline
User avatar

Joined: July 8th, 2019, 12:27
Posts: 148
Location: 中国大陆浙江省湖州市
Some SMI controllers use ECC after swapping bit positions, but I'm not sure if this applies to Samsung MicroSD cards. In some embedded controllers, a linear feedback shift register algorithm with feedback mechanism is employed, but currently, there are no universal tools to help analyze such complex situations

_________________
Auxiliary Tool Used For MonoLith Data Recovery, featuring the industry's most extensive Monolith pinouts
http://flash-matrix.com/


Top
 Profile  
 
 Post subject: Re: About ECC BCH problem in latest SM MicroSD/SD controller
PostPosted: December 7th, 2023, 1:14 
Offline
User avatar

Joined: December 4th, 2012, 1:35
Posts: 3844
Location: Adelaide, Australia
Gregory wrote:
Have any of you tried to figure out how BCH works in the latest Silicon Motion controllers used in latest Samsung MicroSD cards and others such as Sandisk SD ImageMate series, where the SA_ECC structure is 16_16 and is easily corrected with a 285 polynomial, while the data area does not work with any primitive polynomial and different bit rotation, inversion and ECC before XOR where the ECC length is e.g. 114B, 124B ? In the times when FE was still alive, Sergej claimed that ECC in these memories is not BCH, which I cannot agree with, there must be some trick or non-standard polynomial that was used to generate ECC, because if SA is standard BCH, why for Data should be used some other error correction algorithm?

ps. In VNR I do seach polynomial for Data ECC by degree 8,9,10,11,12,13,14,15,16 and I didn't have any hits :(


Dont ever underestimate the F***ckery that Flash manufacturers get up to. It is entirely possible they would use different schemes for SA and Data areas.
SM have some pretty weird schemes, but I am sure if you could talk to the engineers, it would be a very clever way to solve some embedded hardware limitations.


Top
 Profile  
 
 Post subject: Re: About ECC BCH problem in latest SM MicroSD/SD controller
PostPosted: December 7th, 2023, 3:58 
Offline

Joined: September 23rd, 2019, 2:55
Posts: 60
Location: Poland
csava wrote:
Some SMI controllers use ECC after swapping bit positions, but I'm not sure if this applies to Samsung MicroSD cards. In some embedded controllers, a linear feedback shift register algorithm with feedback mechanism is employed, but currently, there are no universal tools to help analyze such complex situations

VNR have bit swapping (Rotate) - all 8 bit variant. No is not LFSR - only Samsung uses this in it's controllers. I have Sandisk 453e9803 chip and structure is similar to MicroSD Samsung Pro (white, grey, blue) 1138_32_32 or 1148_32_32 where SA_ECC is 16_16 and BCH ECC works for SA.


Top
 Profile  
 
 Post subject: Re: About ECC BCH problem in latest SM MicroSD/SD controller
PostPosted: December 7th, 2023, 8:49 
Offline

Joined: September 23rd, 2019, 2:55
Posts: 60
Location: Poland
I will also add that Samsung abandoned its controllers in favor of SM in new MicroSD, UFD USB. For some reason in monolith USB they use standard configuration BCH ECC but not in microSD.
In all this chip you can find unxored marker "SMI". I also attach what LFSR looks like and there is no such thing, as far as I know, SM has never used LFSR.


Attachments:
indentyfikator.PNG
indentyfikator.PNG [ 9.97 KiB | Viewed 227356 times ]
LFSR_Data.PNG
LFSR_Data.PNG [ 47.48 KiB | Viewed 227356 times ]
LFSR_SA.PNG
LFSR_SA.PNG [ 109.45 KiB | Viewed 227356 times ]
Top
 Profile  
 
 Post subject: Re: About ECC BCH problem in latest SM MicroSD/SD controller
PostPosted: December 7th, 2023, 9:55 
Offline
User avatar

Joined: July 8th, 2019, 12:27
Posts: 148
Location: 中国大陆浙江省湖州市
I agree with HaQue statement that in some SSD controllers, both BCH and LDPC encoding/decoding cores coexist. Although it is not explicitly shown in the official product descriptions, this is indeed happening. The primary role of the BCH encoding/decoding core in these controllers is for Die Sorting. The BCH algorithm, compared to the LDPC algorithm, is deterministic and can more accurately assess the error rate in Sorting blocks, swiftly identifying areas that are on the verge of failure. Generally, manufacturers capable of designing LDPC controllers likely have experience with BCH controllers as well, and the BCH encoding/decoding core usually occupies a smaller proportion of the chip area. Therefore, incorporating a BCH encoding/decoding unit in the controller design allows it to adapt to a broader range of applications

_________________
Auxiliary Tool Used For MonoLith Data Recovery, featuring the industry's most extensive Monolith pinouts
http://flash-matrix.com/


Top
 Profile  
 
 Post subject: Re: About ECC BCH problem in latest SM MicroSD/SD controller
PostPosted: December 7th, 2023, 10:02 
Offline
User avatar

Joined: July 8th, 2019, 12:27
Posts: 148
Location: 中国大陆浙江省湖州市
Gregory wrote:
SM has never used LFSR.

No, I don't think so. XOR capable of generating regular patterns is inevitably an LFSR, but not being able to see regular patterns in a bit map doesn't necessarily mean it's not an LFSR. It depends on the length of the seed function, the number of bits in the LFSR register, and the position of the tap bit. As long as the controller manufacturer is willing, they can add any secret sauce that can be easily implemented in conventional algorithms, thus producing unexpected effects

_________________
Auxiliary Tool Used For MonoLith Data Recovery, featuring the industry's most extensive Monolith pinouts
http://flash-matrix.com/


Top
 Profile  
 
 Post subject: Re: About ECC BCH problem in latest SM MicroSD/SD controller
PostPosted: December 7th, 2023, 10:44 
Offline

Joined: September 23rd, 2019, 2:55
Posts: 60
Location: Poland
OK, I found on the web that we may be dealing with something called DuoECC and it is based on BCH codes. This is the first time I've heard of such a thing. Controllers for SD based on this are: SM2705EN, SM2707EN.


Top
 Profile  
 
 Post subject: Re: About ECC BCH problem in latest SM MicroSD/SD controller
PostPosted: December 7th, 2023, 12:15 
Offline
User avatar

Joined: July 8th, 2019, 12:27
Posts: 148
Location: 中国大陆浙江省湖州市
Although the controller can integrate two different error correction units, I believe it's a variant of BCH rather than LDPC. You can verify it through a simple test. If you write a LBA pattern to a target MicroSD card, such as a 64GB card, and then compress the dump after reading, you can observe the difference. Typically, dumps using the BCH error correction algorithm have a relatively low compression rate, while LDPC achieves a high compression rate

_________________
Auxiliary Tool Used For MonoLith Data Recovery, featuring the industry's most extensive Monolith pinouts
http://flash-matrix.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 45 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group